Obtain user's division

Bernardo J. Díaz 1 Reputation point
2022-11-22T14:00:51.737+00:00

Hello,
We are trying to obtain the user's attribute "division" in Microsoft's Graph, which I believe is within employeeOrgData.
We tested a few configuration but we always get a null response or not at all, such as:
https://graph.microsoft.com/v1.0/users/{mail}?$select=id,employeeOrgData
https://graph.microsoft.com/v1.0/users/{mail}?$select=id,employeeOrgData.division

and a few more. The user we are testing with has that information in their Azure's personal information.

Kind regards,
Bernardo

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,752 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Zehui Yao_MSFT 5,831 Reputation points
    2022-11-23T03:17:51.173+00:00

    Hi @Bernardo J. Díaz , I test locally and meet the same error as you mentioned, and I can resolve it by using UpdateUser endpoint to set the employeeOrgData property.
    Hope this can help. Best Wishes.

    263294-image.png

    UpdateUser endpoint: PATCH https://graph.microsoft.com/v1.0/users/{id / userPrincipalName}
    263323-image.png

    263324-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  2. Bernardo J. Díaz 1 Reputation point
    2022-11-23T09:51:32.243+00:00

    Hello @Zehui Yao_MSFT ,
    Thank you for your answer. Is it possible in any way to do this process from Azure's interface?
    It is to make it easier for our client.

    Kind regards.


  3. Paul Rarey EA 21 Reputation points
    2023-01-04T01:05:39.203+00:00

    Hey @Bernardo J. Díaz
    These GraphAPI calls return the individual employeeOrgData subAttributes

    https://graph.microsoft.com/beta/users/{userUPN}/employeeOrgData/division  
    https://graph.microsoft.com/beta/users/{userUPN}/employeeOrgData/costCenter  
    

    What I can't seem to figure out is how to provision those subAttributes to a SCIM app.

    /paul

    0 comments No comments