Share via

Calling microsoft.graph API to create or update data field issues

西湖IT管理员 70 Reputation points
2026-03-16T01:15:09.3766667+00:00

When calling microsoft.graph API to create or update user information, are only these properties available to specify? If we want to add employee number information, which field should be used, and are there hidden or extended fields available for specifying the data?

Any reply would be greatly appreciated:)

https://learn.microsoft.com/zh-cn/graph/api/user-post-users?view=graph-rest-1.0&tabs=httpUser's image

Microsoft Security | Microsoft Graph
0 comments No comments

Answer accepted by question author

Vasil Michev 127K Reputation points MVP Volunteer Moderator
2026-03-16T06:59:42.1266667+00:00

Some properties can only be set/updated after the user object has been created. EmployeeID is one of them, so you have to use the UPDATE/PATCH method.

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-03-16T01:15:29.91+00:00

    For creating or updating a user in Microsoft Graph, the table in the documentation shows only the required properties for creation. Many more optional properties can be set or updated.

    For storing an employee number, the built‑in property is:

    • employeeId (String, max length 16)

    This property is explicitly supported for update via PATCH /users/{id}:

    PATCH https://graph.microsoft.com/v1.0/users/{id}
    Content-Type: application/json
    
    {
      "employeeId": "123456"
    }
    

    Other HR‑related properties that can be set/updated include, for example:

    • employeeType
    • employeeHireDate
    • employeeLeaveDateTime
    • employeeOrgData

    If additional custom data is needed beyond the built‑in schema, directory/schema/open extensions can be used on the user object, but those are separate from the core properties.

    Note that some properties (such as employeeHireDate, birthday, aboutMe, interests, skills, etc.) have special restrictions:

    • They cannot be updated by an app with only application permissions.
    • They must be patched in a request that contains only that property set (no other updatable properties in the same PATCH).

    The employeeId property does not have those special restrictions and can be updated together with other standard properties.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.