Hi Serdar Kilic Thanks for reaching out. I am able to replicate the issue from my test tenant. I would recommend you report this by raising a support case with Microsoft, a dedicated Support Engineer will be able to assist you better. You can raise support ticket from http://aad.portal.azure.com or https://admin.microsoft.com/#/support/requests. Hope this helps. If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.
Send Sharing Invitation - retainInheritedPermissions property failing
When sending a sharing invitation for a driveItem the documentation (https://learn.microsoft.com/en-us/graph/api/driveitem-invite?view=graph-rest-1.0&tabs=http) mentions that you are able to indicate if you want the permissions to inherit by setting the property retainInheritedPermissions
to true or false.
When sending this property through it results in an invalidRequest. If it is omitted, the request succeeds (alas without the permission inheritance).
POST /v1.0/drives/{driveID}/items/{itemId}/invite HTTP/1.1
Payload:
{
"recipients": [
{
"email": "user@example.org"
}
],
"requireSignIn": true,
"sendInvitation": false,
"retainInheritedPermissions": false,
"roles": [
"read"
]
}
Error message:
{
"error": {
"code": "invalidRequest",
"message": "Invalid request",
"innerError": {
"date": "2023-04-06T02:40:11",
"request-id": "xxxxxxxx",
"client-request-id": "xxxxx"
}
}
}
3 additional answers
Sort by: Most helpful
-
Serdar Kilic 45 Reputation points
2023-06-26T05:48:05.6833333+00:00 I haven't seen it elsewhere nor have they mentioned it, and checking the documentation it still hasn't been updated to reflect their response.
-
Vinanth S Bharadwa 26 Reputation points
2023-07-10T05:26:29.7833333+00:00 The request will be succeeded if you add 'Prefer' header for value “apiversion=2.1”.
-
Vinanth S Bharadwa 26 Reputation points
2023-07-10T05:27:34.5466667+00:00 The request succeeds if you add 'Prefer' header for value “apiversion=2.1”.