0
votes

I'm using msal.js

I receive the bearer token but the admin will not allow the use of MS Graph API (permission)

Is there another way to get at least the same information from AD using the bearer token? In general those information https://graph.microsoft.com/v1.0/me

Explore to check https://developer.microsoft.com/en-us/graph/graph-explorer

enter image description here

As a BE I'm using C# and .net core

1
Not really, without admin consent and using Microsoft Graph API you cannot achieve that, its mandatory. - Md Farid Uddin Kiron
Let me know if anything else we can help you... - Md Farid Uddin Kiron

1 Answers

0
votes

There are many attributes that are not exposed via the admin tools or not even synced to Azure AD from the corresponding workloads. But if you know what specific attribute you are looking for, you can easily find the corresponding cmdlet (if one exists). Use this PowerShell command to get all the information that is mentioned in picture by you.

Get-AzureADUser -ObjectId "7bff4715-0b5c-4c63-b1e5-ce9*********"| fl

OfficeLocation is exposed via PowerShell as PhysicalDeliveryOfficeName enter image description here enter image description here enter image description here

Reference : https://docs.microsoft.com/en-us/answers/questions/11697/azure-ad-powershell-to-get-all-user-properties.html