Forum Discussion

eynarain's avatar
eynarain
Brass Contributor
Aug 05, 2019

Microsoft graph add member

I'm trying to add a member to an existing team through graph API. I'm doing the following:

 

1. Obtained the bearer access token by using client_credentials flow

2. Obtained the id of the user and group object

3. Invoked the graph api (https://graph.microsoft.com/v1.0/groups/{groupd_id}/members/$ref) using the bearer token and the following odata object in the body

{

"@odata.id": "https://graph.microsoft.com/v1.0/directoryObjects/{user_id}"

}

I get the following error when doing so.

 

 

I checked the permission for the applications and everything seems to be right (see below). What could be the problem?

 

Resources