petben Posted January 29 Posted January 29 Hello, I am trying to completely delete some users, I have made a script to delete their AD account, OneDrive, Sharepoint Info etc and there's one last bit where the SPO User exisits but will not remove. The account I am using is Glabal Admin and SharePoint admin. Can anyone advise how I remove this last bit? >$UserPrincipalName = "[email protected]" >Get-SpoUser -Site "https://school.sharepoint.com" -LoginName $UserPrincipalName | fl * DisplayName : John Brown LoginName : [email protected] IsSiteAdmin : False IsGroup : False Groups : {} UserType : Member >Remove-SPOUser -Site "https://school.sharepoint.com" -LoginName $UserPrincipalName Remove-SPOUser: Attempted to perform an unauthorized operation. Thanks
robintech Posted January 29 Posted January 29 Does -Verbose show any more info and does it work on any groups/users such as a test group Could also be permissions related "You must be at least a SharePoint Online administrator and be a site collection administrator"
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now