Forum Discussion
Unable to Remove-SPOUser from personal sharepoints properly
Hello,
I had to add a global administrator account literally on every single personal sharepoint, as Site Collection Administrators, to delete a user from each personal sharepoint, with a certain email but associated with a old sharepoint ID (the user was re-added to our Office 365 and he had issues when other were sharing links from personal sharepoint to him, access denied even with the right email, because he have now other sharepoint ID).
Now I want to remove that global administrator account from every personal sharepoint (using: Remove-SPOUser) , using a global administrator account A to remove the global administrator account B that I've added everywhere (Account B was added with Account A login with: Set-SPOUser)(otherwise will get: Remove-SPOUser : A user may not remove his or her own account from a site collection.), but cannot do that because, seems like I need to use an account that is already a Site Collection Administrator, to perform this action, so I am unable to leave just the Primary Site Collection Administrator (the own user).
Over web sharepoint admin center, I can remove and add everyone using Account A, even remove Account A from Site Collection Administrators, it simply doesn't work in the same way when connected over Connect-SPOService.
Please advise how can I remove that Account B, and leave only the Primary Site Collection Administrator as Site Collection Administrator?
How about to assign another global administrator, say account C as a Site Collection Administrator for all personal SharePoint sites and remove account A after that?