This blog will cover an example of a MS Teams provisioning process that was originally delivered for M365 California Jan ’21. The sessions were 30 minutes which covered enough time to discuss the entire process. This blog will contain a four videos which dive deeper on the steps during that sessions.

Setting up the SharePoint List

Setting up the Power Automate Flow

Extending the Flow with MS Graph & Azure Active Directory

Setting up the Power App custom list form and the SharePoint user interaction

This is just an example of one way to provision MS Teams sites and the steps involved in that process, it’s certainly not the only way. Feel free to leave a comment and let me know.

Comments
  • Jdy
    Posted at 8:15 pm December 27, 2021
    Jdy
    Reply
    Author

    Hi Tom, i was curious what kind of URI I have to write here in HTTP > URI > https://graph.microsoft.com/v1.0/groups/New Team ID/sites/…………?

    Can you help me? Because this rule give me an error.

    • Tom Daly
      Posted at 2:25 am January 13, 2022
      Tom Daly
      Reply
      Author

      What was your error? that makes a request to MS Graph so it needs to be something that exists in Azure AD, is needs to be configured on what it is allowed to do and the flow needs the tenant id, client id, and client secret to connect. 3 things that can not be correct, any 1 would cause it not to work

  • Marc
    Posted at 4:02 pm September 13, 2021
    Marc
    Reply
    Author

    This definitely seems simpler that Microsoft “Request a Team” app in GitHub.

    I have a few follow-up questions –

    1) I keep getting the error that the TeamID resource is not found:

    {{{Resource ” does not exist or one of its queried reference-property objects are not present.}}}

    This is on the step to run the HTTP Request, I am calling the URL – https://graph.microsoft.com/v1.0/groups/@{outputs(‘Create_a_team’)?[‘body/newTeamId’]}/

    I checked the MS forums and someone already asked about this, but no one has replied —

    https://powerusers.microsoft.com/t5/General-Power-Automate/create-team-with-Power-Automate-resource-not-found-sometimes/td-p/1171899

    Has Microsoft rolled out a better way to capture the URL? If not, any recommendations to fix this?

    2) Have you been able to take this a step further to automatically create the same specific channels for each Team that is created?

    Thanks in advance.

    • Tom Daly
      Posted at 6:34 pm September 13, 2021
      Tom Daly
      Reply
      Author

      Thanks for the feedback. I have not encountered issue with the TeamID not found, I see in that article that you could possibly introduce a delay to help. In this case the teams url is only used to write back to SharePoint. You could put that step on a delay to update sharepoint and not block the remainder of the flow.

      #2 yes you can create channels in the flow as well, there is an action for. I have done this in flow and also via powershell pnp scripts in an azure function.

  • Alan Burchill
    Posted at 6:58 am July 20, 2021
    Alan Burchill
    Reply
    Author

    Can you post the BODY sample you had in for the send http to sharepoint request. I am getting an invalid JSON token error on that step.

    • Tom Daly
      Posted at 1:10 pm July 21, 2021
      Tom Daly
      Reply
      Author

      hope this comes through correctly.

      {
      "type": "object",
      "properties": {
      "@@odata.context": {
      "type": "string"
      },
      "webUrl": {
      "type": "string"
      }
      }
      }

  • Mota
    Posted at 10:29 am January 27, 2021
    Mota
    Reply
    Author

    Hi Tom, really cool walkthrough and very informative. Please can you provide some scenarios where this would process could prove effective? Thanks in advance.

    • Tom Daly
      Posted at 2:59 pm February 10, 2021
      Tom Daly
      Reply
      Author

      Thanks for the feedback. I’ve done 2 more complicated implementations of this in a similar way but there are also products that do the same thing.

      The 2 bigger projects wanted to control how the teams are provisioning so they could be approved by an admin. I used Power Automate in 1 and built a custom SPFx webpart to do the provisioning in another to compare and at the time there were no Preview Flow controls for Teams. Ultimately they wanted to templatize the teams creation process, creating “Project” teams. After provisioning adding members, activating SharePoint features, joining sites to a hub, setting up teams. While most of this would be done in the Power Automate, many steps are done in an Azure Function that can do more. The Power Automate last step is to call the Azure Function to perform some of the site/teams manipulation.

  • Leave a Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.