Forum Discussion

Benjamin1998's avatar
Benjamin1998
Copper Contributor
Oct 17, 2022
Solved

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?

  • TonyRedmond's avatar
    TonyRedmond
    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.

8 Replies

Resources