Delete a sharing permission from a file or folder

Nikita Gubenkov 20 Reputation points
2023-03-03T13:48:37.6033333+00:00

Hi,

I have a question regarding "Delete a sharing permission from a file or folder" according to the link https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/permission_delete?view=odsp-graph-online

I can delete group permission, by doing the following request :

DELETE /me/drive/items/{item-id}/permissions/{perm-id}

The question is it possible to delete only specific emails from this group, and keep access for remaining?

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | OneDrive | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Answer accepted by question author
  1. Vasil Michev 123K Reputation points MVP Volunteer Moderator
    2023-03-03T14:52:11.5633333+00:00

    You mean the scenario where the item was shared with a group? No, you cannot remove specific entries out of the expanded group membership, you can only remove the group entry itself. If you have sufficient permissions, try adjusting the actual group membership (https://learn.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-beta&tabs=http).

    Also note that you cannot remove inherited entries, ones with non-null value of inheritedFrom.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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