get all the Shared link from SharePoint Library for all document in CSV file

%3CLINGO-SUB%20id%3D%22lingo-sub-2690805%22%20slang%3D%22en-US%22%3Eget%20all%20the%20Shared%20link%20from%20SharePoint%20Library%20for%20all%20document%20in%20CSV%20file%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2690805%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20to%20fetch%20all%20the%20share%20link%20for%20each%20document%20from%20sharepoint%20library%20using%20powershell.%20We%20should%20not%20want%20to%20go%20again%20and%20again%20for%20each%20document%20and%20copy%20the%20link%20from%20each%20file.%20Is%20there%20anyway%20to%20copy%20the%20share%20link%20or%20generate%20the%20link%20and%20download%20it%20in%20CSV%20file%20from%20SharePoint%20Online.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2690805%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Lists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESites%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

Hi All, 

 

I need to fetch all the share link for each document from sharepoint library using powershell. We should not want to go again and again for each document and copy the link from each file. Is there anyway to copy the share link or generate the link and download it in CSV file from SharePoint Online. 

1 Reply
Nothing provided by default in the platform...this new capability might help: https://aka.ms/spoexternalaccessexpiration...but I would recommed you to take a look a the following sources:
- SPO PowerShell cmdlets
- PnP PowerShell cmdlets
- SPO APIs