Thank you for your time on the call today. As per our discussion you were facing an issue where you were unable to update phone number for few users in Entra ID via Entra connect.
Below are the steps that we took to resolve the issue.
Synchronized users properties cannot be changed from Microsoft Entra ID or Microsoft 365 admin portals, neither through any available PowerShell modules. Up until recently, the exception to this was the Microsoft Entra user’s attributes called MobilePhone and AlternateMobilePhones. These attributes are synchronized from on-premises Active Directory attributes mobile and otherMobile, respectively, but end users used to be able to update their own phone number in MobilePhone attribute in Microsoft Entra ID through their profile page. Changes to MobilePhone and AlternateMobilePhones attributes are no longer possible for Synchronized users except through the use of Microsoft Entra Connect or Microsoft Entra Cloud Sync.
When the Admin uses MsOnline or AzureAD PowerShell module or the user goes to MOP and updates the Mobile attribute, the updated phone number will be overwritten in Azure AD regardless of the object being synced from onpremises AD (DirSyncEnabled=true). Along with this update, Azure AD also sets the attribute "DirSyncOverrides = Mobile (1)" on the object to flag that this user had a Mobile phone set from Azure AD. From this point on, any update to the Mobile attribute coming from onpremises will simply be ignored by Azure AD as this attribute is no longer managed from on-prem AD.
We ran below commands to fix the issue,
- Install-Module Microsoft.Graph
- Connect-MgGraph -Scopes OnPremDirectorySynchronization.ReadWrite.All
- $directorySynchronization = Get-MgDirectoryOnPremiseSynchronization
- $directorySynchronization.Features.BypassDirSyncOverridesEnabled = $true
- Update-MgDirectoryOnPremiseSynchronization -OnPremisesDirectorySynchronizationId $directorySynchronization.Id -Features $directorySynchronization.Features
- Verify the status of the BypassDirSyncOverridesEnabled feature: (Get-MgDirectoryOnPremiseSynchronization).Features.BypassDirSyncOverridesEnabled
- Once the feature is enabled, start a full synchronization cycle in Microsoft Entra Connect using the following command: Start-ADSyncSyncCycle -PolicyType Initial
You can refer to below article to get more information,
https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/how-to-bypassdirsyncoverrides
Let us know if you have any further questions.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.