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.
zeg
Jun 01, 2023Copper Contributor
Hi Benjamin1998
Maybe you already know this, but you know you could use Select-MgProfile beta as it will provide you with more attributes (163 instead of 138 @time of this reply).
I found “AssignedLicenses” useful.
Please remember that beta can change any time and MS does not recommend it for production.