Skip to content

Add ability to set Primary Site Collection Admin to Set-PnPTenantSite #2743

@shcrist

Description

@shcrist

Is your feature request related to a problem? Please describe.
Yes. I cannot set the primary site collection admin on a site. Both Set-PnPTenantSite and Add-PnPSiteCollectionAdmin only allow for adding admins to the SCA group. There is no method to set the primary admin.

Describe the solution you'd like
I would like the same functionality provided by the SPOService with Set-SPOSite -Identity $siteURL -Owner "User@domain.com"

Describe alternatives you've considered
I tried to update the Owner property on the site but it is read only. I also tried using the SPOService in conjunction with PowerShell PnP but they don't play together. So the only option I have right now is to do this action external to the rest of my script and use the SPOService to do so.

Additional context
An additional parameter of -PrimaryOwner that accepts either a user or M365 group and sets the Primary Admin to that value would be perfect.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions