Get Permission matrix report of folders and subfolders

Copper Contributor

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. 

 

2 Replies

@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

 

@Jennifer_Wilson,

 

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