0

When we login into sp online tenant site, we can see site coll admins of sites to which we donot have access. Is it possible to retrieve primary and secondary admin of all site collection without having to add a user account as administrator using powershell.

0

I’m afraid we can not get all administrator without a administrator account. I have tried with a full control account but it did not return any value.

Pnp powershell code for your reference:

$cred = Get-Credential
Connect-PnPOnline -Url https://contoso.sharepoint.com/sites/dev -Credential $cred
Get-PnPSiteCollectionAdmin

Download pnp powershell Here:

https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-pnp/sharepoint-pnp-cmdlets?view=sharepoint-ps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.