How do I create a sharing link with the Graph API which works for users in other tenants?

ThomasNicholson-3073 0 Reputation points
2024-07-16T09:22:15.4466667+00:00

When I create a sharing link in the MS Teams app, I have the option to create a link for users with existing access:

Teams options(apologies for the mixed languages; Teams sometimes incorrectly overrides its own settings with the system language)

This creates a link in the following form:

https://gfinet.sharepoint.com/:x:/r/sites/GFIMS-TeamsTestteam/Shared%20Documents/General/ShareTest.xlsx?d=w757509dff3ff41e7b78007afb861736e&csf=1&web=1&e=oRcd5Z

The link can be accessed by users in any tenant who have access, e.g. via groups.

How can I create links like this from the Graph API? The only documented options for scope are "anonymous", "organisation", or "users". Links created with organisation scope prevent users from other tenants cannot use the link even if they have permission to access the file.

If this is not possible with the Graph API is there another way to build the URL?

Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

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.