Unable to update the specified properties for on-premises mastered Directory Sync objects or objects currently undergoing migration

Damodara, K 20 Reputation points
2025-02-07T09:38:09.49+00:00

Hi Team,

I'm reaching out because I'm encountering an issue with Azure Data Factory (ADF) while using a custom activity to update users into Entra ID. Specifically, I'm seeing the following error in the stdout.txt file:

Error:

Code: Request_BadRequest

Message: Unable to update the specified properties for on-premises mastered Directory Sync objects or objects currently undergoing migration.

Additionally, in the stderr.txt file, I'm getting this error:

Error:

Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).

at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()

at System.Net.Http.HttpClient.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,149 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Raja Pothuraju 12,200 Reputation points Microsoft Vendor
    2025-02-07T13:08:13.0766667+00:00

    Hello @Damodara, K,

    Thank you for posting your query on Microsoft Q&A.

    Based on your description, I understand that you are using a custom activity in Azure Data Factory (ADF) to update users in Entra ID but are encountering the error: "Unable to update the specified properties for on-premises mastered Directory Sync objects or objects currently undergoing migration."

    This error occurs when attempting to update properties of users that have been synced from an on-premises Active Directory to Entra ID via Microsoft Entra Connect. Direct modifications to these users in Entra ID (e.g., via scripts or the Azure portal) are not allowed. Instead, any changes must be made in the on-premises Active Directory and then synchronized to Entra ID using Entra ID Connect.

    Here are the key scenarios where this error can occur:

    • These cannot be updated if the user is enabled for sync or is managed by Exchange Online
    • These cannot be updated if the user existed when sync was disabled for tenant

    Could you please provide more details on the specific user properties you are trying to update? Also, are these users synced from on-premises Active Directory, or are they cloud-only users?

    I hope this information helps. Please feel free to reach out if you have any further questions.

    If you found this answer helpful, kindly click "Accept Answer" and upvote it. If you have additional questions, please click "Comment" to continue the discussion.

    0 comments No comments

Your answer

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