Unable to get user company information on microsoft graph API

Viewed 4657

I'm having a problem with Microsoft Graph API... Currently I have a web application that has an openid integration with Microsoft/Azure using the common v2 endpoint.

We are trying to get the signed in user company name and job information. The official docs say that we need to make a request to the MS Graph API.

We are testing it on Microft Graph Explorer but it doesn't seem to work.

We've selected the 'User.Read' as a permission in our app, then tried these endpoints:

https://graph.microsoft.com/v1.0/me/
https://graph.microsoft.com/v1.0/me?$select=companyName,jobTitle
https://graph.microsoft.com/v1.0/users/?$select=companyName,jobTitle

In MS offical doc (https://developer.microsoft.com/en-us/graph/docs/concepts/permissions_reference) on User/Remarks sections, it clearly says that "On reads, only a limited number of properties are returned by default. To read properties that are not in the default set, use $select"

Is this doc outdated? I've tried to reach MS support for developers, but they answered saying that I should ask this on Stack Overflow... So probably there are no official support for developers? Is it really possible to get the company name and job title from a MS account?

Thanks in advance!

edit. Update question with MS graph explorer screenshots enter image description here enter image description here

edit.2. Update screenshot with proper encoding.

Also, it's a MS account not an Azure account, since our web app accepts both of them on the common v2 endpoint.

Update

My goal was trying to get the Work Info section from a MSA account. enter image description here

1 Answers
Related