Git Product home page Git Product logo

teamsrequests's People

Contributors

cdbuzzell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jcalan8907

teamsrequests's Issues

Replace delay in flow with status check

Instead of waiting an arbitrary amount of time for the Team Clone operation to complete, make calls to check before continuing
https://docs.microsoft.com/en-us/graph/api/resources/teamsasyncoperation?view=graph-rest-1.0
A Microsoft Teams async operation is an operation that transcends the lifetime of a single API request. These operations are long-running or too expensive to complete within the timeframe of their originating request.
When an async operation is initiated, the method returns a 202 Accepted response code. The response will also contain a Location header, which contains the location of the teamsAsyncOperation. Periodically check the status of the operation by making a GET request to this location; wait >30 seconds between checks. When the request completes successfully, the status will be "succeeded" and the targetResourceLocation will point to the created/modified resource.

Owners of groups are not members

I have been using this process to provision Teams groups for my company for a few months now with mostly good results. The issue I have been experiencing is when the ownership permission is applied to the group using the REST call to Graph, it is only applying the owner to the Office 365 group, and because they are an owner only and not a member as well, they are unable to add features such as Planner.

What I have done to correct this issue is to precede the HTTP call to add ownership to the group with the below HTTP call to add the requester as a member first, then add them as an owner.

HTTP action
{"inputs": { "method": "POST", "uri": "https://graph.microsoft.com/v1.0/groups/@{outputs('Strip_Team_ID_from_Location_Response')}/members/$ref", "headers": { "Authorization": "Bearer @{body('Parse_JSON')?['access_token']}" }, "body": { "@@odata.id": "https://graph.microsoft.com/v1.0/users/@{body('Get_Owner_ID')?['id']}" } } }

The result is a Teams group having the requester as both member and owner in Azure AD which allows for the requester to be able to utilize the Teams Group like any member can.

(re)adding existing Team owners

If the Request includes adding a Team owner (or secondary owner) who also happens to have created the template, the HTTP request to add the owner fails because that user is already present.

How might that error be best avoided/suppressed?

Eliminate bearer token call

Instead of making the initial HTTP call to get a bearer token, you can choose the Azure AD auth type on the POST to do it for you, eliminating the need for the first HTTP action.

Encode secret

UrlEncode the secret string in the flow to deal with special characters

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.