I am trying to add users to a team that I have created through the Graph API using application permissions, but I run into an issue.
I POST the following object to https://graph.microsoft.com/beta/teams/{teamid}/members:
{"roles":[],"@odata.type":"#microsoft.graph.aadUserConversationMember","[email protected]":"https://graph.microsoft.com/beta/users/60d7e7a4-b1f6-4a5a-a9a3-80480156cb31"}
which returns 403 error code for guest users, regardless of if they are pending acceptance or has accepted the invitation. I get the following object returned:
{ "error": { "code": "Forbidden", "message": "An unknown error has occurred.", "innerError": { "date": "2020-12-17T12:10:54", "request-id": "16b3d4d7-6295-4cbd-b1bb-3803678947a6", "client-request-id": "16b3d4d7-6295-4cbd-b1bb-3803678947a6" } } }
It would seem like I might be missing some sort of permission, but I currently have these permission: Group.ReadWrite.All- Application
OnlineMeetings.ReadWrite.All - Application
TeamMember.ReadWrite.All - Application
User.Invite.All - Application
User.Read.All - Application
I have no issue when adding a member of the organisation to the team, it works perfectly fine.
Does anyone have any idea what could be wrong?