Dec 24 2018 06:33 AM
Hello Team,
Please update us is there any way to get the report or name of the users who have permission of site collection administration on SharePoint online tenant.
Is there any script for power shell because its very difficult to find name by going each and every site collection on tenant.
Regards,
Reena Roy
Dec 24 2018 10:37 AM
Try this script and To run this you must be a SharePoint Online global administrator and a site collection administrator
$Creds = Get-Credential $site = ‘https://tenant-admin.sharepoint.com’ Connect-SPOService -Url $site -Credential $Creds $AllSites= Get-SPOSite -Limit All $users = @(); foreach ($Allsite in $AllSites) { $AllUsers = Get-SPOUser -Site $AllSite.Url -Limit all | select DisplayName, LoginName,IsSiteAdmin $users+=$AllUsers $AllUsers = $null #Write-Host $AllSite.Url" completed" } $users | Export-Csv -Path "C:\Users\Desktop\allusers.csv" -NoTypeInformation -Force $Data = Import-Csv "C:\Users\Desktop\allusers.csv" foreach($aUser in $Data) { if($aUser.IsSiteAdmin -eq “True”) { Write-Host $aUser.DisplayName $aUser.LoginName } }
Hope this helps
Dec 26 2018 07:19 AM
Dec 27 2018 03:20 AM