SharePoint APIs to Get Sharing Settings

Karishma Trehan 0 Reputation points
2023-12-11T06:54:04.31+00:00

We're currently working with Microsoft SharePoint Sites, and in this use case, we need to retrieve access details from the Sharing Settings as outlined below. Does anyone have experience with the APIs that provide details for the following settings or information on documents shared within the organization?
Screenshot 2023-12-08 at 2.36.51 PM

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

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2023-12-12T01:41:40.28+00:00

    Hi @Karishma Trehan,

    I would recommend you to use Rest api to get the data for share link. Please refer to following api

    _api/web/Lists(@a1)/GetItemById(@a2)/GetSharingInformation
    

    Refer to the article for more details

    https://cann0nf0dder.wordpress.com/2018/04/04/externally-sharing-getsharinginformation-rest-api/


    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.


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.