
You're building a Power Automate flow to create Teams for classroom use, but you're facing a frustrating issue: the "Create a team" action inconsistently assigns ownership, and the "Add a member to a team" action sometimes fails, leaving you with ownerless teams and permission errors—even after implementing a Do Until loop with delays up to 90 minutes.
Based on internal documentation and community best practices, here’s a breakdown of what’s happening and how to improve your flow.
The issue stems from asynchronous provisioning delays in Microsoft Teams. When a team is created via Power Automate, it may take several minutes (sometimes up to an hour) for the backend to fully register the team and its metadata, including ownership. During this window:
Do Until loop may still hit permission errors because the team object isn’t ready to be queried.This behavior is confirmed in Microsoft’s guidance on error handling in Power Automate .
Instead of a long Do Until loop, use retry policies on the “Add member” and “Assign owner” actions:
{
"retryPolicy": {
"type": "exponential",
"count": 5,
"interval": "PT5M"
}
}
This allows Power Automate to retry failed actions intelligently without blocking the flow .
After creating the team:
Group your membership and ownership actions into a Scope, and configure “Run After” settings to handle failures gracefully:
If the owner assignment fails:
If Power Automate actions continue to fail, consider using HTTP actions with Microsoft Graph API:
/teams/groups/{id}/owners/$ref/groups/{id}/members/$refThis gives you more control and better error feedback. You’ll need to register an Azure AD app and authenticate using client credentials.