SOLVED

How to get the manager with the get-user?

Brass Contributor

Hi,

I've added managers to a handful of employees with the command line for the purpose of testing

 

Set-User andy.kw -Manager Big.Boss

I can see the manager through the graphical interface of Office 365 but when using the get-user cmdlet, nothing is coming.

 

When looking at the doc, nothing is mentioned though.

Any ideas?

Cheers,

Andy

7 Replies

You should connect to Azure AD and run Get-AzureADUserManager

https://docs.microsoft.com/en-us/powershell/module/azuread/get-azureadusermanager?view=azureadps-2.0

And for adding manager to Office 365 users you can use Set-AzureADUserManager

Hi P.R,

 

Thanks for the quick reply.

The Set-AzureADUserManager is only available the azure ad, right?

Cheers,

Andy

 

 

best response confirmed by Andy Kw (Brass Contributor)
Solution

Yes, you should install Azure AD module for Powershell:

https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-msonlinev1?view=azureadps...

 

(please mark my reply as accepted response if it helped)

Get-User should also reflect on the changes though. It might be some delay replication, but that shouldn't take more than a couple of minutes.

1 best response

Accepted Solutions
best response confirmed by Andy Kw (Brass Contributor)
Solution

Yes, you should install Azure AD module for Powershell:

https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-msonlinev1?view=azureadps...

 

(please mark my reply as accepted response if it helped)

View solution in original post