Forum Discussion
Cannot create new team on Teams
Hi everyone,
I'm trying to create new Team on existing Group but I keep getting error :
{
"error": {
"code": "Forbidden",
"message": "Forbidden",
"innerError": {
"date": "2020-07-15T09:42:47",
"request-id": "fc95373a-26ea-4d3a-b180-662a42853e6d"
}
}
}
Request is done using Application Token and this config :
endpoint : PUT https://graph.microsoft.com/v1.0/groups/{GroupID}/team
body :
{
"memberSettings": {
"allowCreateUpdateChannels": true
},
"messagingSettings": {
"allowUserEditMessages": true,
"allowUserDeleteMessages": true
},
"funSettings": {
"allowGiphy": true,
"giphyContentRating": "strict"
}
}
On the Azure directory permissions : Group.ReadWrite.All, Directory.ReadWrite.All , are set and granted by admin
Is there any issue on this endpoint?
- Gousia_BegumMicrosoft
DMarcolo Could you please try this in the graph explorer? Also are you using Delegated permissions or Application permissions?
- DMarcoloCopper Contributor
Hi Gousia_Begum ,
permissions are under Application permissions and they are all Granted. If I run the same request from the Api explorer ( logged ) I got the same results : Unauthorized
- gk_vasudevBrass ContributorDMarcolo change your action from "GET" to "PUT" and try again
- gk_vasudevBrass Contributor
Hi DMarcolo
check your request once again and also check if you mentioned content-type: application/json in request header.
Refer the link below.
https://docs.microsoft.com/en-us/graph/api/team-put-teams?view=graph-rest-1.0&tabs=http
Even if the request is correct and you still getthis error,
You wouldn't be having access to the resource or the resource must have conditional access
click on below link for more info on errors.
https://docs.microsoft.com/en-us/graph/errors
cheers.
- DMarcoloCopper Contributor
Thanks gk_vasudev ,
but data format and request is correct and well formatted. I copy/paste the structure right from the sample on the create team page : https://docs.microsoft.com/en-us/graph/api/team-put-teams?view=graph-rest-1.0&tabs=http
Same results.
Token is up-to-date, because via the app I'm working on, I'm able to get users list, groups list, create user & group. The Forbidden is a "no sense" to me: there is no policy of access, permissions are all granted
- gk_vasudevBrass Contributor