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: