Hello @Sheila ,
Thank you for reaching out to Microsoft QnA forum. Historically, updates to the UserPrincipalName attribute using the sync service from on-premises was blocked, From March 2019, synchronizing UPN changes for federated user accounts is allowed. If your AD Connect setup was performed before 2019 there are high chances that Directory Sync Service feature "SynchronizeUpnForManagedUsersEnabled" is set to False. This results in not sync UPN changes from AD to AAD/Entra ID.
For all new deployments, this feature is on by default for newly created Microsoft Entra directories. You can see if this feature is enabled for you by running:
Connect-MgGraph -Scopes "OnPremDirectorySynchronization.Read.All"
$DirectorySync = Get-MgDirectoryOnPremiseSynchronization
$DirectorySync.Features.SynchronizeUpnForManagedUsersEnabled
If this feature isn't enabled for your Microsoft Entra directory, then you can enable it by running:
Connect-MgGraph -Scopes "OnPremDirectorySynchronization.ReadWrite.All"
$SyncUpnManagedUsers = @{ SynchronizeUpnForManagedUsersEnabled = "true" }
Update-MgDirectoryOnPremiseSynchronization -Features $SyncUpnManagedUsers -OnPremisesDirectorySynchronizationId $DirectorySync.Id
After enabling this feature, existing userPrincipalName values remain as-is. On next change of the userPrincipalName attribute on-premises, the normal delta sync on users updates the UPN. Once this feature is enabled, it's not possible to disable it.
For more information on UPN updates please refer following article: https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/how-to-connect-syncservice-features#synchronize-userprincipalname-updates
Hope this will help. Please "Accept the answer" if the information helped you. This will help us and others in the community as well.