Skip to main content

Missing Users Import Due to Null UserType Attribute

Missing Users Import Due to Null UserType Attribute

Overview

During user synchronization via Azure AD (Entra ID) integration, certain users may not be imported into inSync. This issue occurs because the userType attribute for the affected users is set to null, causing them to be excluded from group filtering and the subsequent mapping process.

Reason

The userType field returns a null value when the property has not been defined in Azure AD or has not synchronized correctly. Since the integration relies on this attribute to identify user roles, a null value results in a failed import.

Example API Request & Response:


GET https://graph.microsoft.com/v1.0/users/{user-id}?$select=id,displayName,userType

{

"id": "ae28b7ff-60f7-493a-8cb9-cc4e39eab393",

"displayName": "John Doe",

"userType": null

}

Resolution

Follow these steps to troubleshoot and resolve the missing user import issue.

Step 1: Check the Request Format

Verify that your API requests are correctly formatted. If using the Microsoft Graph API to update user attributes, ensure the payload is correct.

Example PATCH Request:

PATCH https://graph.microsoft.com/v1.0/users/{userId}

Content-Type: application/json

{

"userType": "Member"

}

Note: Replace {userId} with the actual Azure object ID.

Step 2: Update the UserType via PowerShell

You can manually set the userType using the Microsoft Graph PowerShell module.

# Install and Connect

Install-Module Microsoft.Graph -Scope CurrentUser

Connect-MgGraph -Scopes "User.ReadWrite.All"

# Update the User

Update-MgUser -UserId {User-ID} -UserType "Member"

Step 3: Verify the Update via Microsoft Graph API

Confirm the changes by querying the user object again:

GET https://graph.microsoft.com/v1.0/users/{user-id}?$select=userType

# Expected Response

{

"userType": "Member"

}

Step 4: Sync and Validate

Once the attribute is updated in Azure AD:

  1. Delete and recreate the existing user mapping in inSync.

  2. Trigger a manual sync or allow the auto-sync process to run (up to 24 hours).

The missing users should now appear in the import logs and be successfully added to the system.

Did this answer your question?