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.
Hello Tom! How are you? I hope you can help me. I have problems with PowerApps when we are changing in SharePointIntegration the inputs.
Example: Set(SharePointFormMode, “CreateForm”); NewForm(NewItemForm); Navigate(NewItemScreen, None)
All 3 give me variable problems…
It’s been a while since I’ve reviewed this post.
It might be because the variable doesn’t exist. Set(SharePointFormMode, “CreateForm”)
is just a variable name.
NewItemForm – needs to be the name of the form for a new item.
NewItemScreen – needs to be the name of the new item screen.
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.
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
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.
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.
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.
hope this comes through correctly.
{
"type": "object",
"properties": {
"@@odata.context": {
"type": "string"
},
"webUrl": {
"type": "string"
}
}
}
Thanks, but something seems to have gone wrong parsing the Project Site URL… I am actually getting https://graph.microsoft.com/v1.0/$metadata#sites(webURL)/$entity written back into the list… Hmm
not sure what has happened in your case, be happy to take a look. I’ll reach out.
Hi Tom, really cool walkthrough and very informative. Please can you provide some scenarios where this would process could prove effective? Thanks in advance.
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.