Issue: While Inviting user/Add permission to Item,Getting 400 with message - The request is malformed or incorrect. This was worked earlier and stopped working now.
Article: https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_invite
Post URL :
POST /v1.0/me/drive/items/01B6CXZGZ7RGHIXZBXKNCZB747AVB52EQ2/invite HTTP/1.1
Host: graph.microsoft.com
Connection: keep-alive
Content-Length: 213
Pragma: no-cache
Cache-Control: no-cache
Accept: application/json, text/plain, /
Origin: https://developer.microsoft.com
Payload :
{
"recipients": [{ "email": "[email protected]" }],
"message": "Here's the file that we're collaborating on.",
"requireSignIn": false,
"sendInvitation": true,
"roles": [ "read" ]
}
Response:
{
"error": {
"code": "invalidRequest",
"message": "The request is malformed or incorrect.",
"innerError": {
"request-id": "c8a02a02-299c-4ace-8e40-dbd6f830d9ba",
"date": "2018-05-17T11:38:00"
}
}
}
PD: We also have tested the beta version of the graph api, and the response is the same than with the v1.0