Get-AzureADUserMembership

This Azure PowerShell article will discuss the syntax and usage of the Get-AzureADUserMembership PowerShell command with examples.

Get-AzureADUserMembership

The Get-AzureADUserMembership is an excellent PowerShell command to get the specified user membership in the Azure AD.

Syntax

Below is the syntax of the Get-AzureADUserMembership PowerShell command.

Get-AzureADUserMembership
 -ObjectId <String>

Let’s discuss an example of how to use the Get-AzureADUserMembership PowerShell command.

Example

You can execute the below PowerShell command to get the membership details of the user with the object ID 54481342-e592-47c2-ba89-b07dcadf9346.

Get-AzureADUserMembership -ObjectId 54481342-e592-47c2-ba89-b07dcadf9346

Once I executed the above PowerShell command, I got the below-expected output.

Get-AzureADUserMembership -ObjectId 54481342-e592-47c2-ba89-b07dcadf9346

ObjectId                             DisplayName          Description                 
--------                             -----------          -----------                 
09b0fe44-95d0-4aa2-8cb2-23b92c054696 Global Administrator Company Administrator rol...

DeletionTimestamp            : 
ObjectId                     : 26a1666e-6584-4afe-9218-44b0dd452426
ObjectType                   : Group
Description                  : This Group belongs to TsInfo
DirSyncEnabled               : 
DisplayName                  : TsInfoGroup
LastDirSyncTime              : 
Mail                         : TsInfoGroup@fewlines4bijuhotmail.onmicrosoft.com
MailEnabled                  : True
MailNickName                 : TsInfoGroup
OnPremisesSecurityIdentifier : 
ProvisioningErrors           : {}
ProxyAddresses               : {SMTP:TsInfoGroup@fewlines4bijuhotmail.onmicrosoft.com}
SecurityEnabled              : True

You can see the same output below

Get-AzureADUserMembership

Get-AzureADUserMembership – Video Tutorial

You may also like following the articles below

Final Thoughts

In this Azure article, we discussed the syntax and usage of the Get-AzureADUserMembership PowerShell command with an example. Thanks for reading this article !!!