SOLVED

Is there any API to get organizational role of user of office 365 admin center?

Brass Contributor

Is there any API using which I can get the office 365 role of the user? If yes can someone help me with it?

sunnykalola_0-1600423600693.png

I want to get the user roles shown in the above screenshot using an API call? Can someone help me with it?

1 Reply
best response confirmed by ThereseSolimeno (Microsoft)
Solution

You can get this via the good old Get-MsolUserRole cmdlet. There's no direct replacement in the Azure AD PowerShell module or the Graph API, afaik. If using those, you'll have to enumerate membership of all directoryRoles.

1 best response

Accepted Solutions
best response confirmed by ThereseSolimeno (Microsoft)
Solution

You can get this via the good old Get-MsolUserRole cmdlet. There's no direct replacement in the Azure AD PowerShell module or the Graph API, afaik. If using those, you'll have to enumerate membership of all directoryRoles.

View solution in original post