Send Sharing Invitation - retainInheritedPermissions property failing

Serdar Kilic 45 Reputation points
2023-04-06T04:12:53.88+00:00

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"
        }
    }
}
Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft Security | Microsoft Graph
{count} vote

Accepted answer
  1. Gopinath Chennamadhavuni 2,446 Reputation points
    2023-04-06T06:11:23.2+00:00

    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.

    1 person found this answer helpful.

3 additional answers

Sort by: Most helpful
  1. 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.

    0 comments No comments

  2. Vinanth S Bharadwa 31 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”.

    User's image

    0 comments No comments

  3. Vinanth S Bharadwa 31 Reputation points
    2023-07-10T05:27:34.5466667+00:00

    The request succeeds if you add 'Prefer' header for value “apiversion=2.1”.

    User's image

    0 comments No comments

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.