Forum Discussion

Divyang Patel's avatar
Divyang Patel
Copper Contributor
Dec 21, 2017

External sharing link for all documents in doc library

Hi Everyone, 

 

Recently we migrated around 20K documents from Box to SharePoint online document library but my job is to create the View-only link for external users for each document.

I'm not sure which is best way do it, PowerShell comes to my mind, i don't know the commands for the same. 

 

Moreover, once done, I also need to export those links mapped with document on CSV.

 

Can anyone please help me to achieve the same..

4 Replies

  • Rob Ellis's avatar
    Rob Ellis
    Bronze Contributor
    It looks like you can use the Graph API to create the links - see here:
    https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/driveitem_createlink

    It doesn't look like you can do it natively in PowerShell, but you could call out to the Graph API from PowerShell.
    • Divyang Patel's avatar
      Divyang Patel
      Copper Contributor

      Hi Rob Ellis,

       

      I tired Graph API however, It didn't work out well for me. Do you have any instruction or guide for the same? I've registered the app and updated the permissions too but still unable to generate the links. 

       

       

      • Rob Ellis's avatar
        Rob Ellis
        Bronze Contributor
        I'm afraid not. I just found the original link I posted. I've no experience of it myself.

Resources