microsoft-graph-api

Can Graph Be Used to Update AAD or Is There a Workaround


I'm trying to write code to update some user information in AAD. I've also tried to do the same with Graph Explorer, but run into the same problem. I can add and delete users, but update gives the same answer. I've ready that update isn't possible based upon the error I'm getting. Is this true? If there is a work around, I would appreciate getting it. Here is the error I get:

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


Solution

  • Your error implies that you're trying to update an on-prem AD object that's being synced to Azure AD.

    These sync'd objects can't be modified from a cloud tool such as Azure AD or Graph API, as on-prem AD is the master and controls the object and all properties. Any change to these objects needs to be made directly from on-prem AD.