0
votes

I'm having issue with the Microsoft Graph API when creating a team on Teams. The only response I got is: Forbidden . With no other error info/description.

The request is the following:

    PUT : https://graph.microsoft.com/v1.0/groups/<groupId>/team

    header : {
      'Accept-Encoding' => 'gzip, deflate, br',
      'Authorization' => 'Bearer <tokeSTRING>
    }

    request parameter : {  
      "memberSettings": {
        "allowCreateUpdateChannels": true
      },
      "messagingSettings": {
        "allowUserEditMessages": true,
        "allowUserDeleteMessages": true
      },
      "funSettings": {
        "allowGiphy": true,
        "giphyContentRating": "strict"
      }
    }

The response:

{
  "error": {
    "code": "Forbidden",
    "message": "Forbidden",
    "innerError": {
      "date": "2020-07-15T09:42:47",
      "request-id": "<requestId>"
    }
  }
}

On Azure I've already gave the Application permissions to create Group/Team as described under the route page : https://docs.microsoft.com/en-us/graph/api/team-put-teams?view=graph-rest-1.0&tabs=http

Anyone having the same issue?

1

1 Answers

0
votes

I guess, your request should have following code only

{  
    "memberSettings": {  
        "allowCreateUpdateChannels": true  
    },  
    "messagingSettings": {  
        "allowUserEditMessages": true,  
        "allowUserDeleteMessages": true  
    },  
    "funSettings": {  
        "allowGiphy": true,  
        "giphyContentRating": "strict"  
    }  
}  

Enter the PUT command as usual

https://graph.microsoft.com/v1.0/groups/<groupId>/team