Add Directory Extensions to NIM
Microsoft Entra ID guide
Expose Microsoft Entra ID directory extensions in NIM so they can be collected, viewed, and used in mappings.
Before you begin
Create the directory extension in Microsoft Entra ID before adding it to NIM. NIM can then read and update the extension by extending the Microsoft Entra ID REST schema.
Use either Microsoft-supported approach to create the extension:
- Microsoft Graph PowerShell:
New-MgApplicationExtensionProperty - Microsoft Graph REST API: create an extension property
Add the extension to the NIM schema
This example adds a custom extension to the Users table.
-
Create or open the REST system schema file for your Entra ID system:
C:\ProgramData\Tools4ever\NIM\config\rest\systems\<systemname>.jsonFor example:
C:\ProgramData\Tools4ever\NIM\config\rest\systems\Azure.json -
Add the extension under
schema.crud_objects.users.resources. Preserve any existing schema content in the file.<systemname>.json{"schema": {"crud_objects": {"users": {"resources": {"extension_46fd3ad18be2497aa1459db1226a4b5c_T4ETestField1": "string*"}}}}}Use your extension’s exact nameextension_46fd3ad18be2497aa1459db1226a4b5c_T4ETestField1is only an example. Replace it with the exact directory extension name created in your Microsoft Entra ID environment. -
Save the JSON file.
If the schema file already contains configuration, merge the resources entry into the existing JSON instead of replacing the entire file. Invalid JSON prevents NIM from loading the custom schema.
Verify the extension in NIM
Inside of NIM, the custom field should be displayed in the system configuration, as shown below.
Once visible, the new field can be used in a mapping like any other attribute.