Graph API: PUT / beta / groups / <groupId> / command Authentication failed
Problem
PUT request /beta/groups/<groupId>/team fails:
{ "error": { "code": "AuthenticationError", "message": "Error authenticating with resource.", "innerError": { "request-id": "e4385864-85e4-4fa6-8878-458988c584e4", "date": "2017-11-10T10:29:39" } } } A bearer token is provided that was generated using delegate rights on Group.ReadWrite.All .
The endpoint is documented here .
Things I've found so far
It seems that this is something related to the resources of the teams. The following queries do not work:
PUT /beta/group/<groupId>/teamGET /beta/me/joinedTeams
Both do not work with AuthenticationError .
Update
/beta/group/<groupId>/team now works.
There was a problem when we got an access token for graph.microsoft.com/ with a trailing slash. This has been fixed, and now you should be able to call / beta / group // team using the token obtained using the slash.
Note. Conducting this as an answer so that other participants cannot go through all the comments.
For those who are still facing this issue in 2018: Whiteid said they have installed a generation of tokens with a slash, which is partly true. End slash token generation works for successful requests, but not for failed requests.
'/ beta / me / joinTeams' still returns an AuthenticationError for us. Only when we removed the trailing slash from the token generation did we get a more descriptive error message stating that our test user did not have a team license.
Everything worked fine by providing our test user with the correct license.