Microsoft Graph API - Invite endpoint returning Bad request every time

Thibault Ceulemans 1 Reputation point
2020-11-24T12:25:15.347+00:00

I'm trying to share SharePoint directory so specific user invite the invite API endpoint from Microsoft Graph : https://learn.microsoft.com/en-us/graph/api/driveitem-invite

Every time I do the request, I'm receiving a "400 - Bad request" response.
Here is my request: https://graph.microsoft.com/v1.0/sites/***/drives/***/items/***/invite
Here is the payload: { "requireSignIn": true, "sendInvitation": false, "roles": [ "read" ], "recipients": [ { "email": "***@***.***" } ] }

It used to work perfectly.
A colleague of yours asked me to enter a Microsoft Support ticket : https://stackoverflow.com/questions/64889777/microsoft-graph-api-invite-endpoint-returning-bad-request-every-time

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,282 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.