Zoio Silva
Zoio Silva

Reputation: 1

How to get the Department field from the Office profile using Microsoft Graph?

I'm trying to get the Department field from the Contact Information in the Office 365 profile using the Microsoft Graph API, but the data being returned doesn't match.

Screenshot of contact information in office.com
Screenshot of the query in the Graph Explorer

Example:
Office 365 user profile page: https://nam.delve.office.com/?u=d10110c2-5f89-40dc-8db2-323e35e24f73&v=editprofile
Microsoft Graph API query: https://graph.microsoft.com/v1.0/me/department
Microsoft Graph API query result:

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('d10110c2-5f89-40dc-8db2-323e35e24f73')/department",
    "value": "Clinical"
}

I logged into office.com and the Microsoft Graph Explorer using the same account, and all fields seems to match, except this particular field which doesn't.

Could anyone help me find out what am I missing there?

Upvotes: 0

Views: 1330

Answers (1)

Shweta
Shweta

Reputation: 351

I am not able to repro this behavior. For me, a response from graph API matches the department name stated on the profile page(office.com)

Couple of things to check here -

  1. Make sure you are logged in with correct account at both places.
  2. If not, please share actual screen shot from both places. Also please share request timestamp and client id from graph call.

Hope this helps. Thanks!

Upvotes: 0

Related Questions