Getting OneDrive's organization-level external sharing setting via API

JohnErvin-4462 40 Reputation points
2023-06-11T12:42:24.9+00:00

Hi all,

I am trying to get the sharing capability of OneDrive. It is available in the admin center as shown explained here: https://learn.microsoft.com/en-us/sharepoint/turn-external-sharing-on-or-off#change-the-organization-level-external-sharing-setting

Graph REST API supports getting SharePoint's sharing level using this call: https://learn.microsoft.com/en-us/graph/api/sharepointsettings-get?view=graph-rest-1.0&tabs=http

but I also want to get OneDrive's external sharing setting.

Is it possible? why it is not implemented in the API?

Thanks a lot!

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

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 46,376 Reputation points
    2023-06-12T03:12:05.5633333+00:00

    Hi @JohnErvin-4462

    You can of course manage OneDrive's organization-level external sharing settings using the graph API.

    You can share drive items with organization-level internal/external users by creating a share link, and you can list internal or external users who have been granted access to the share link.

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.


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.