Unable to create MS Teams from Office 365 group

simonthomas
Tera Contributor

I am attempting to use Flow Designer and the Create Team action to create a new MS Team from an Office 365 group. The flow is failing and returning the error message "User is not an owner to perform migration of this Group to Team". 

 

I can successfully create a new Team by calling the same API from Postman.

 

Response body:

{
"error": {
"code":"Forbidden",
"message":"User is not an owner to perform migration of this Group to Team",
"innerError": {
"code":"AccessDenied",
"message":"User is not an owner to perform migration of this Group to Team",
"details":[],
"date":"2024-07-15T15:14:19"
}
}
}

 

Error message:

{
    "Step Status": {
        "code": 1,
        "message": "Error:  Access Denied, you are not the owner of the group you are trying to access. (Process Automation.ab728a5d53d621109eebddeeff7b12c2; line 13)"
    }
}

 

In summary:

- I have no issues generating an Office 365 group via ServiceNow

- I can use that Office 365 group to generate a new Team via Postman

- I can't use that Office 365 group to generate a new Team via ServiceNow

7 REPLIES 7

Hi Simon, I'm facing the same issue. Did you find a solution for this issue from the Microsoft end ?

Zmud1
Tera Contributor

Bumping again - has anyone been able to find a solution for it?

dbook
Kilo Sage

I've had to handle this issue before, the below was the solution. 

1)Ensure the Grant type for the credential is 'Authorization code'. 
2)Clear out any associated tokens from 'Manage Tokens' 

3) From the credential record use the 'Get OAuth Token', but when doing this ensure you are logged in as a Service Account which has the correct permissions with Azure to execute the command (e.g. an Admin account). 
4) Validate in 'Manage Tokens' that the User is the relevant Service Account.