Forum Discussion
kiran bellala
Sep 07, 2018Brass Contributor
What is the difference between Remove-msoluser and Remove-SPOExternalUser
Hi all
I doing some clean up of external users in my tenant and deleting stale guest users. There are 2 cmdlets that can be used to delete Guest users: remove-spoexternaluser and remove-msoluser. I understand remove-msoluser can be used to delete both tenant users and external users also. But when it comes to guest users, are they both same?
It looks like both can be used to delete external user from Azure AD. And both cmdlets don't delete the external user id from user info list in SharePoint. Is there a preference of one over other?
- Both cmdlets allow to delete external users and the differences are just wha you have described plus the cmdlets were built by different teams. In regards of preference, I would always try to use Azure AD Cmdlets to deal with user and groups operations in your tenant