Reputation: 1766
we have a screen in our application that is used to update Azure AD users through Graph API. If users are created using Azure Portal or Graph API, I'm able to updated user profile using this screen.
But if the user is Created/Sync using AD Connect(e.g in case of O365 Users) while updating these Users Microsoft Graph returns following error:
Unable to update the specified properties for on-premises mastered Directory Sync objects or objects currently undergoing migration
I have following queries:
Upvotes: 0
Views: 3516
Reputation: 2590
To answer your questions:
To see if a Graph user is created through the sync you should request the User.Read.All
scope for your application and then do a request to the Get user endpoint with the select all properties querystring ?$select=*
.
The synced users should have the OnPremisesSamAccountName
property amongh others that don't appear on a non-synced user.
Once you found out the user is an on-premise user, your application could do an update straight to your AD with the System.DirectoryServices.AccountManagement api.
Upvotes: 1