Hi @Arun Kamle
Teams tag is mainly focused on the general issue of Microsoft Teams troubleshooting. According to your description, your question is not in our support scope.
The following suggestion is for your reference:
If you want to get a list of shared links in a SharePoint Online document library, you can use a PowerShell script to do so. Here is a sample script that helps you list shared links for all files in a document library:
- Install the SharePoint Online Administration Module:
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
- Connect to SharePoint Online:
$adminUrl = "https://<your-tenant>-admin.sharepoint.com" Connect-SPOService -Url $adminUrl -Credential (Get-Credential)
- Get shared links in a document library:
$siteUrl = "https://<your-tenant>.sharepoint.com/sites/<your-site>" $libraryName = "<your-library>" $items = Get-PnPListItem -List $libraryName -PageSize 1000 foreach ($item in $items) { $sharingLinks = Get-PnPSharingLink -Identity $item.Id -List $libraryName foreach ($link in $sharingLinks) { Write-Output "File: $($item.FieldValues.FileRef) - Link: $($link.Url)" } }
Make sure to replace <your-tenant>, <your-site>, and <your-library> with your actual tenant, site, and document library names.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.