Feb 27 2023 04:40 AM
Hi,
I have to prepare a report where I have to get users/groups and permissions on each of the folders and file in a document library. The library contains several nested folders and most of the folders have unique permissions.
If I loop and send request for each of the folder so it is taking longer and page becomes irresponsive.
Please suggest a solutions.
Feb 27 2023 09:41 AM
@Rajeshlohar you can use this in PowerShell:
$siteUrl = "https://contoso.sharepoint.com/sites/marketing"
$listName = "Shared Documents"
$users = Get-SPOUser -Site $siteUrl
$list = Get-SPOList -Identity $listName -Site $siteUrl
You can exported to csv:
$results | Export-CSV "C:\Reports\PermissionMatrix.csv" -NoTypeInformation
Mar 06 2023 02:21 AM
The script you mentioned exports only permission of document library. While I need to export each folders and subfolders with permissions in excel. Many folders has unique permission enabled so need the details of each folders. I am assuming almost 1000 folders are in a library.
Thanks,
Rajesh