Jul 15 2020 02:47 AM - edited Jul 15 2020 02:49 AM
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?
Jul 16 2020 02:38 AM
@DMarcolo Could you please try this in the graph explorer? Also are you using Delegated permissions or Application permissions?
Jul 16 2020 02:56 AM
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
Jul 16 2020 03:16 AM
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.
Jul 16 2020 03:21 AM
Jul 16 2020 03:35 AM
Jul 16 2020 03:43 AM
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
Jul 16 2020 04:06 AM
Jul 16 2020 09:51 AM