Hi all,
I've noticed an increase in demand for automated team creations based off custom templates.
The workflow is pretty straight forward.
Form is submitted -> Flow is triggered -> Existing Team is cloned -> Value's are changed based on pre-defined values in the form.
The template team site consists of some basic unconfigured apps, Tabs & 3 channels(including general) with a bland folder structure.
Everything is set public (for the time being).
Authentication:
Azure Enterprise application with the following API Permissions:
Directory.ReadWrite.All
Group.ReadWrite.All
Team.Create
Teamwork.Migrate.All
User.Read
HTTP Request:
{
"type": "Http",
"inputs": {
"uri": "https://graph.microsoft.com/v1.0/teams/@{variables('TemplateSite')}/clone",
"method": "POST",
"body": {
"displayName": "Project-@{variables('NewTeamName')}",
"description": "The new site for Project-@{variables('NewTeamName')}",
"mailNickname": "Project-@{variables('NewTeamName')}",
"partsToClone": "apps,tabs,settings,channels,members",
"visibility": "Public"
},
"authentication": {
"type": "ActiveDirectoryOAuth",
"authority": "",
"tenant": "@{variables('TenantId')}",
"audience": "https://graph.microsoft.com",
"ClientId": "@{variables('ClientId')}",
"secret": "@{variables('ClientSecret')}"
}
},
"runAfter": {
"ClientSecret": [
"Succeeded"
],
"NewTeamName": [
"Succeeded"
],
"TemplateSite": [
"Succeeded"
]
}
}
Results:
Within 60 seconds of submitting the form i see a new team has been created and applications/tabs get linked.
Issue:
If i browse the team in SharePoint and click Documents the following becomes clear:
The error for every folder as listed above is:
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2