I am trying to create a new team via Graph. Simple Example which works fine from Graph Explorer.
Post v1.0 https://graph.microsoft.com/v1.0/teams
{
"template@odata.bind":"https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
"displayName":"2158",
"description":"My Sample Team Description",
"members":[
{
"@odata.type":"#microsoft.graph.aadUserConversationMember",
"roles":["owner"],
"user@odata.bind":"https://graph.microsoft.com/v1.0/users('1234545-1a63-4760-89da-360d22144bb8')"
}
]
}
When I insert the same body into a Power Automate HTTP request, I cannot save the Flow. I get a Flow Checker Error of
"Fix Invalid expression(s) for the input parameters of operation 'HTTP_Post_to Graph' (my action name).
This is using either of client secret or an authentication token - my Graph permissions in the app reg are very extensive.
If I remove the members block I can save the Flow but then it says I cannot create a team with no owners which makes sense of course, but I can't see how to add members.
Using the beta version of this Teams call the syntax is different and this works:
{
"template@odata.bind": "https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
"displayName": "Team 1",
"description": "My Sample Team Description",
"owners@odata.bind": [
"https://graph.microsoft.com/v1.0/users('111111-1a63-4760-89da-360d22144bb8')"
]
}
but the client does not want beat used in production fair enough.
Am I missing something here? I know MS advise creating the group first and then the Team but the requirements require this to be as fast as possible, and having to wait for the group creation causes issues.
I am using the exact example from the MS docs for this (example 2). As I say, Graph Explorer works, but I cannot save the Flow at all.