Forum Discussion
Benjamin1998
Oct 17, 2022Copper Contributor
Get-MgUser - how to get only users?
Is there a filter for this command to get only users and no rooms and resources as result?
- Oct 17, 2022
Benjamin1998 Azure AD doesn’t distinguish between an account used by a human and one used by a resource, like a shared mailbox. You’ll have to filter the set returned to get the data you want. This is one reason why I often use Get-
ExoMailbox instead as it’s easier to filter the set.
Benjamin1998
Oct 17, 2022Copper Contributor
Hello Tony,
I always get users and ressources.
How to get only users?
I always get users and ressources.
How to get only users?
TonyRedmond
Oct 17, 2022MVP
Benjamin1998 Azure AD doesn’t distinguish between an account used by a human and one used by a resource, like a shared mailbox. You’ll have to filter the set returned to get the data you want. This is one reason why I often use Get-
ExoMailbox instead as it’s easier to filter the set.
- Benjamin1998Oct 17, 2022Copper ContributorHello Toni,
I can use Get-ExoMailbox instead.
Thanks!