Home » Microsoft 365 » Get-MgUserDirectReport – Get Direct Reports

Get-MgUserDirectReport – Get Direct Reports

The Get-MgUserDirectReport cmdlet in PowerShell gets the users and contacts that report to the user. This command gets the direct reports for the user where the users and contact have their manager property set to this user.

To use the Get-MgUserCount cmdlet, you must first connect to your Microsoft 365 tenant using the Connect-MGraph cmdlet. Once you are connected, you can use the Get-MgUserCount cmdlet.

Connect-MgGraph -Scopes 'User.Read.All'

In this article, we will discuss how to use the Get-MgUserDirectReport cmdlet in PowerShell to get the user’s direct reports.

How to Get a User’s Direct Reports

To get a user’s direct reports in Microsoft Graph, run the following command.

 Get-MgUserDirectReport -UserId '1f149c47-a670-4f12-a4ac-01423cbafb58' 

This command gets the direct reports for the specified user.

Get User's Direct Report in Microsoft Graph
Get User’s Direct Report in Microsoft Graph

Conclusion

I hope the above article on how to use the Get-MgUserDirectReport cmdlet in PowerShell to get the user’s direct report is helpful to you.

You can find more topics about PowerShell Active Directory commands and PowerShell basics on the ShellGeek home page.

Related Links

Get-MgUserCreatedObject