update User

Marco Brambilla 1 Reputation point
2022-02-02T11:03:14.777+00:00

Azure Active Directory cannot update user principal name if a user has a mailbox. We have a local AD and connect it with azure. Azure set User Principal name from AD mail parameter; Azure update User Principal Name if we change mail parameter on user in AD only if the user doesn't have a mailbox. If the user has a mailbox Azure doesn't update User Principal Name with the new one.

Many thanks

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

3 answers

Sort by: Most helpful
  1. Andy David - MVP 142.2K Reputation points MVP
    2022-02-02T12:26:45.583+00:00

    You can update with MSOL powershell:

    https://learn.microsoft.com/en-us/powershell/module/msonline/set-msoluserprincipalname?view=azureadps-1.0

    Set-MsolUserPrincipalName -UserPrincipalName "davidc@contoso.com" -NewUserPrincipalName "davidchew@contoso.com"
    

  2. Marco Brambilla 1 Reputation point
    2022-02-02T13:01:02.683+00:00

    This is a good workaround but not for all user. Something is not working properly, the automation doesn't work as expected


  3. Danny Zollner 9,521 Reputation points Microsoft Employee
    2022-02-02T15:37:45.917+00:00

    Are there any errors? From what I can extract from this post, it sounds like users who have mailboxes (or.. are licensed in Azure AD?) are not having their UPN updated? Check if the SynchronizeUPNForManagedUsers flag on your tenant is set to False, and if so, set it to True. It's a legacy setting for older tenants that is locked to True for any tenants created in the last 4 or 5 years.

    https://learn.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-syncservice-features#synchronize-userprincipalname-updates