web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Creating Teams with Au...
Power Automate
Suggested Answer

Creating Teams with Automate loses Permissions

(2) ShareShare
ReportReport
Posted on by 4
Currently, I am attempting to build an automate flow that handles creating a team for use as a classroom with all of the channels and resources prebuilt. However, there is like a 3/5 chance that the create a team action will not assign me as an owner, and like a 1/5 chance that if it does not, the add a member to a team action will fail as well. So right now I've got like 20 ownerless teams where the flow will run great for a little while and then suddenly not assign an owner. Attached is a screenshot of the relevant section. Currently, I am now running a do until that looks at the members of the team and attempts to see if any of the members have the owner role. If so, exit the loop. But I'm still getting permission errors even on the loop. My total delays add up to an hour and a half and still no resolution.

Is there a better way to do this? 
Is there a different set of actions that could provide the same effect as creating a team and assigning an owner?
 
For clarification, we have several super-computer-illiterate instructors who need this to host classes in teams. We do not have teams for education, so we are making do with regular teams. And we need to get our Multimedia guys out of the hosting game to make sure classes run smoothly. If I can get this script working its going to be a one line form they can input the name of a new class, hit enter and step into the team to teach.
flow.png
Categories:
I have the same question (0)
  • Suggested answer
    Jon Unzueta Profile Picture
    1,836 Super User 2026 Season 1 on at
     

    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.


    🔍 Root Cause of Ownerless Teams

    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:

    • The team exists but is not fully initialized.
    • Membership and ownership actions may fail due to incomplete provisioning.
    • The 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 .

     


    ✅ Recommended Fixes

    1. Use Retry Policies Instead of Long Delays

    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 .

     

    2. Add a Delay + Status Check

    After creating the team:

    • Add a Delay of 5–10 minutes.
    • Use the “Get team details” action to confirm the team is fully provisioned.
    • Only proceed to assign owners once the team metadata is available.

    3. Use Scopes for Error Handling

    Group your membership and ownership actions into a Scope, and configure “Run After” settings to handle failures gracefully:

    • Log errors
    • Send notifications
    • Retry or skip based on conditions 

    4. Fallback Owner Assignment

    If the owner assignment fails:

    • Add yourself as a member first
    • Then promote yourself to owner using Graph API or Teams Admin Center

    🧠 Alternative Approach: Use Graph API Directly

    If Power Automate actions continue to fail, consider using HTTP actions with Microsoft Graph API:

    • Create the team using /teams
    • Assign owner using /groups/{id}/owners/$ref
    • Add members using /groups/{id}/members/$ref

    This gives you more control and better error feedback. You’ll need to register an Azure AD app and authenticate using client credentials.

     

    🏷️ Tag me if you have any further questions or if the issue persists. ✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems. ❤️ Give it a Like if you found the approach useful in any way.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 450

#2
Haque Profile Picture

Haque 366

#3
Valantis Profile Picture

Valantis 349

Last 30 days Overall leaderboard