0

Inside any SharePoint Online sites, we have the following four sharing options: -

User's image

Now I am building a custom REST API (one using Power Automate, the other using .NET Core)>> which should generate the above four sharing options using SharePoint REST API. So, from where I can find a full documentation from Microsoft about the related rest service api endpoint and the available options? mainly I want the following scenarios: -

  • Create/Generate "Anyone" link with password + View permission
  • Create/Generate "People you choose" + View permission + specifying the list of emails (internal & external) + Without sending direct invitation email (only generating the link).

can anyone advice on this please? from where I can find the related documentations from Microsoft which details how to implement the above scenarios using SharePoint REST API ?

  • You're assuming it's possible. I'm not so sure it is. – Skin May 22 '23 at 07:01
  • @Skin i think technically it is possible, when i inspected the UI using browser developer tool i found that there is an endpoint named "ShareLink".. but i did not find any documentation about it.. so my concern if i use this end point will it be future proof ? did you get my concern ? – microsoftdeveloperdesigner May 22 '23 at 07:07

1 Answers1

0

did you try to create a shareable link with Graph API? https://learn.microsoft.com/en-us/graph/api/driveitem-createlink?view=graph-rest-1.0&tabs=http

Yes, it's not SharePoint REST API as indicated in your question, but this API is well documented by Microsoft, and probably more future-proof.

jleture
  • 538
  • 1
  • 4
  • 11
  • the problem with Graph API is that it requires premium license inside power automate – microsoftdeveloperdesigner May 22 '23 at 12:31
  • Yes, that's right, HTTP connector is needed to call Graph API But SharePoint REST API cannot generate a shareable link. An alternative is to use SharePoint REST API to break inheritance, give permission to a user and share a direct link to the document. – jleture May 22 '23 at 13:39
  • This answer is not responding the Question – Shila Mosammami May 22 '23 at 14:02
  • It's not possible to do it, so there is no answer, no documentation to find, but only alternative and advice as requested. – jleture May 22 '23 at 14:14
  • @jleture SharePoint rest api do provide an endpoint named ShareLink which allow us to create sharing links but i am asking about the official documentations regarding this end point – microsoftdeveloperdesigner May 22 '23 at 14:30
  • There is a sample of working code in this post https://sharepoint.stackexchange.com/questions/303243/sponline-how-to-generate-a-sharing-link-via-rest/303248#303248 but still no official documentation about it. – jleture May 22 '23 at 15:08