API Sharepoint to Remove user from shared link

Rachid B 26 Reputation points
2022-10-24T13:55:54.563+00:00

Hello,

Please is it possible to remove specific user from shared link via API SharePoint

253553-image.png

Thanks,
Regards.

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,663 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 30,991 Reputation points Microsoft Vendor
    2022-10-25T07:50:34.283+00:00

    Hi @Rachid B
    As far as I know, there is no such rest api for us to remove a user in sharelink. I will recommend you to achieve this by following graph api.

    DELETE /sites/{site-id}/drive/items/{item-id}/permissions/{perm-id}  
    

    For more details
    https://learn.microsoft.com/en-us/graph/api/permission-delete?view=graph-rest-beta&tabs=http


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.