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 Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,266 questions
OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
1,142 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,822 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 108K Reputation points MVP
    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 Answers by the question author, which helps users to know the answer solved the author's problem.