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 / Unable to Save Flow wh...
Power Automate
Answered

Unable to Save Flow which creates Teams from Template because of @odata.type

(1) ShareShare
ReportReport
Posted on by 20
I'm trying to use an HTTP call to create a Team from a template. Should be easy, below is the request body:
 
But because the odata.type is in there, it wont allow the Flow to save.... this is a bug for sure and a very annoying one. Anyone know if there's a solution they're working on to let us do simple things like this???
 

{
  "template@odata.bind": "https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
  "displayName": "My New Team",
  "description": "Created from template",
  "members": [
    {
      "@odata.type": "#microsoft.graph.aadUserConversationMember",
      "roles": ["owner"],
      "user@odata.bind": "https://graph.microsoft.com/v1.0/users('user@example.com')"
    }
  ]
}
 
Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,456 Most Valuable Professional on at
    I just tried it with essentially your code and the flow saves fine for me.  Are you getting a specific error when trying to save?

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • Suggested answer
    Tomac Profile Picture
    4,105 Moderator on at
    Looks like you're saying the Team isn't saving after the flow runs, rather than an issue saving the flow, correct?
     
    Try the following in the body of your HTTP action:
    {
       "template@odata.bind":"https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
       "displayName":"My Sample Team",
       "description":"My Sample Team’s Description",
       "members":[
          {
             "@odata.type":"#microsoft.graph.aadUserConversationMember",
             "roles":[
                "owner"
             ],
             "USER@odata.bind":"https://graph.microsoft.com/v1.0/users('USER_GUID')"
          }
       ]
    }
    Be sure to change USER and USERGUID to match what you're using, along with the team name and description.
     
    Also note that in your original example, you were using an email or UPN for the user in your odata.bind call instead of the GUID.
  • SDV-365Titans Profile Picture
    20 on at
    So  can you try using the new editor? That's the one I'm using, but if it works with the old one, I guess I need to switch back for this flow.
  • SDV-365Titans Profile Picture
    20 on at
    I tried switching back to the old editor, but got the same error. Now the http action is inside a for each loop, so that might break the saving of the flow.
  • Pstork1 Profile Picture
    69,456 Most Valuable Professional on at
    Works for me in the new or the old editor.  Make sure you change the email address of the user to an existing user in your system.  Also make sure you aren't trying to use the Teams connector to Invoke the HTTP. The Teams resource without an object reference isn't supported in that connector.  I'm not sure why it won't work for you.  I copied your request body and just changed the email address.
     

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • SDV-365Titans Profile Picture
    20 on at
    try putting the HTTP call in a nest of for-each loops, that should break it, which would mean it's a bug in PA?
     
    or just add the json in a compose action, also throws an error:
     
  • Pstork1 Profile Picture
    69,456 Most Valuable Professional on at
    @SDV-365Titans Can you provide a screenshot of your flow?  As you can see from my screenshot the code works fine for me in both editors.  I'm trying to reproduce your error, but need more information about your specific configuration.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • Suggested answer
    Pstork1 Profile Picture
    69,456 Most Valuable Professional on at
    @SDV-365Titans OK, I think I know what your problem is and why it works for me.  You are trying to store the body of the HTTP call in a Compose statement.  That's what is keeping you from saving it.  Either put the body directly in the HTTP call like I did or store it in a String Variable.  The Compose action stores things in an untyped fashion, not a string. So I think that is where the problem is coming in.  If you put it in a String variable or do it directly it should work. Just get rid of the Compose statement and you'll be able to save.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • Tomac Profile Picture
    4,105 Moderator on at
    I see the issue. Power Automate is trying to parse @odata.type":" as an expression and it's failing because the expression is invalid.
     
    This is definitely a bug which Microsoft will need to fix, but in the meantime can you successfully run your command without the odata.type item in your JSON?
  • Verified answer
    Tomac Profile Picture
    4,105 Moderator on at
    Note that you can save the full JSON array as a string variable:
     
    which allows you to save the flow, BUT you need to exit the editor and then go back into it before creating this variable and trying to save. Then simply reference this string variable as the body of your HTTP action.
     
    Yeah, weird bug with weird behavior.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 801

#2
Valantis Profile Picture

Valantis 602

#3
Haque Profile Picture

Haque 581

Last 30 days Overall leaderboard