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 / Create a flow for the ...
Power Automate
Unanswered

Create a flow for the entirety of the teams environment

(1) ShareShare
ReportReport
Posted on by 42
Good day,
 
I need to create a flow that will do something for every team and channel under those teams in the enviornment.  I do not want to have a separate flow for each team, there are several hundred.  Any suggestions are appreciated.
 
Thank you,
Hyde
I have the same question (0)
  • MParikh Profile Picture
    521 Super User 2026 Season 1 on at
    Hi Hyde,

    You need a single flow that loops across all teams and channels dynamically, rather than hardcoding each one.
    The approach uses the Microsoft Graph API via HTTP actions in Power Automate.

    Step 1: Get all teams
    Add an HTTP action with:
    GET https://graph.microsoft.com/v1.0/me/joinedTeams
    
    Or, if you need all teams in the tenant (not just yours), use:
    GET https://graph.microsoft.com/v1.0/groups?$filter=resourceProvisioningOptions/Any(x:x eq 'Team')
    This requires a service principal or admin-consented app registration with Team.ReadBasic.All permission.

    Step 2: Loop through each team
    Apply an "Apply to each" loop over the teams array from the response body. Parse the JSON first using the value array from the Graph response.

    Step 3: Get channels for each team
    Inside that loop, add another HTTP action:
    GET https://graph.microsoft.com/v1.0/teams/{teamId}/channels
    Use the id field from the current team item as {teamId}.

    Step 4: Inner loop for channels
    Add a second "Apply to each" inside the first, iterating over the channels. Then place your action inside this inner loop.

    Authentication note
    Use an Azure AD app registration with client credentials. In Power Automate, configure the HTTP action with Active Directory OAuth. This avoids delegated permission issues at scale.

    Performance note
    Several hundred teams with multiple channels each will generate a large number of iterations. Graph API throttles at roughly 10,000 requests per 10 minutes per app. Add a "Delay" action between iterations if you hit 429 errors, or consider batching with $batch endpoint:
    POST https://graph.microsoft.com/v1.0/$batch


    Thank you! 
    Proud to be a Super User!
    📩 Need more help?
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping

     
  • Hyde Profile Picture
    42 on at
    Thank you so much for the quick reply.  I will test and update the thread with my results.  
     
    Have a great evening,
    Hyde
  • Hyde Profile Picture
    42 on at
    @MParikh For HTTP Request the flow is saying that "https://graph.microsoft.com/v1.0/groups?$filter=resourceProvisioningOptions/Any(x:x eq 'Team')" is not a valid URI.  Any suggestions?
     
    I also tested it in the Graph API dev center and go this...
     

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 May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard