Replies: 2 comments 1 reply
-
If you use Get-PnPTenantSite, you can get the property Owner. This is the Primary Site Collection Admin, for OneDrive would be the user owner of the OneDrive. But yes, if you need all the Site collection admins from a site, then you need to be also Site Collection Admin. |
Beta Was this translation helpful? Give feedback.
-
Yes, and that is exactly the problem. Not that Microsoft provides any better solution as far as know... it only works properly in the GUI, in sharepoint advanced settings, manage user profiles. |
Beta Was this translation helpful? Give feedback.
-
Per standard, global admins also have no access to the contents of onedrive sites.
This is good, but this also has the result that Get-PnPSiteCollectionAdmin cannot be used on a OneDrive, unless you are site collection admin on it already.
Strangely, there is no issue adding owners: Set-PnPTenantSite -Owners works without issue.
But that means that it is impossible to just get the list of owners, without having to force yourself as owner on the OneDrive.
Any way to do it without having to alter the ownership?
Beta Was this translation helpful? Give feedback.
All reactions