Forum Discussion
Fromelard
Mar 30, 2017Iron Contributor
Office 365: Add accounts into the Site collection administrators list via PowerShell and CSOM
To add accounts (group or User) into the SPO SIte collection admin via code, there are 2 possible solutions: Via PowerShell and SPO Admin Really simple case ideal for one shot action, you need t...
Mikael Svenson
Mar 31, 2017Iron Contributor
Or use the PnP commandlets :) https://github.com/SharePoint/PnP-PowerShell/blob/master/Documentation/SetPnPTenantSite.md -owners param to set site collection admins.
- FromelardApr 02, 2017Iron ContributorThanks for this comment
It's another way, but from my side i prefer to be closed to the csom object model
Fab- Mikael SvensonApr 02, 2017Iron ContributorAnything PnP is close to the model, as it uses CSOM...just removes plumbing for you in many scenarios with extension methods.
- FromelardApr 02, 2017Iron ContributorAs i said you, it's another way
So thank you
Fab