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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create a Team with Graph
Power Automate
Suggested Answer

Create a Team with Graph

(1) ShareShare
ReportReport
Posted on by 6
Hi
 
I'm trying to create a Team using the Graph API, but it fails.
 
I have an application in Entra with these permissions:
Directory.ReadWrite.All
Group.Create
Group.ReadWrite.All
Team.Create
TeamMember.ReadWrite.All
TeamSettings.ReadWrite.All
User.Read
User.Read.All
 
In Power Automate, I have added an HTTP-action, configured like this:
 
According to https://learn.microsoft.com/en-us/graph/api/team-post?view=graph-rest-1.0&tabs=http#example-2-application-permissions this is the correct way to call the API for creating a Team. However it fails miserably like this:
 
 
 
I have no idea why it's giving me a HTTP 400 invalid request URL? That's https://graph.microsoft.com/v1.0/teams, right?
 
Has anyone successfully created a team with Graph in Power Automate? (I'm creating teams just fine using the API in my own code, using the same Entra app, it just doesn't work in Power Automate)
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,369 Super User 2025 Season 2 on at
    Hi,
     
    I will provide you with how to resolve it, so as to better help than just saying.
     
    Use this.
     
     
    There you will see the following, which you need to fill in to make it work. Test it out there first, then you will easily be able to create it in PA.
    that being said the issue is specifically getting the oAuth Token, also why are you using double @@??
  • CU13091257-0 Profile Picture
    6 on at
    Thanks for your answer, FLMike. As stated, I can create a team via the API (for example using Graph Explorer), but it fails in Power Automate.
    When creating with app permissions, you must provide a user to be owner, as it doesn't run in a user-context. The double @'s is because Power Automate uses Workflow Definition Language, and they must be escaped, or you will get this: 
    "The input parameter(s) of operation 'HTTP' contains invalid expression(s). Fix invalid expression(s) for the input parameter(s) of operation 'HTTP'."
    (Reference: https://community.powerplatform.com/forums/thread/details/?threadid=a6d931d7-81e8-4c91-8016-8826cc227cc3)
    If anyone has successfully created a Team in Power Automate using application permissions, I'm eager to learn, because following the documentation does *not* do the trick :)
  • VJ-16091057-0 Profile Picture
    2 on at
    Thanks for your answer, FLMike.
     
    As stated, I can create a team via the API (for example using Graph Explorer), but it fails in Power Automate.
    When creating with app permissions, you must provide a user to be owner, as it doesn't run in a user-context. The double @'s is because Power Automate uses Workflow Definition Language, and they must be escaped, or you will get this: 
    "The input parameter(s) of operation 'HTTP' contains invalid expression(s). Fix invalid expression(s) for the input parameter(s) of operation 'HTTP'."
    (Reference: https://community.powerplatform.com/forums/thread/details/?threadid=a6d931d7-81e8-4c91-8016-8826cc227cc3)
     
    If anyone has successfully created a Team in Power Automate using application permissions, I'm eager to learn, because following the documentation does *not* do the trick :)

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard