# Email address not syncing on login for Azure AD Enterprise connection

**URL:** <https://community.auth0.com/t/email-address-not-syncing-on-login-for-azure-ad-enterprise-connection/87608>\
**Category:** Get Help\
**Tags:** login\
**Created:** [July 25, 2022, 5:13pm UTC](https://community.auth0.com/t/email-address-not-syncing-on-login-for-azure-ad-enterprise-connection/87608 "2022-07-25T17:13:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![VP003](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vp003/32/33660_2.png) [@VP003](https://community.auth0.com/u/VP003)\
**Post date:** [July 25, 2022, 5:13pm UTC](https://community.auth0.com/t/email-address-not-syncing-on-login-for-azure-ad-enterprise-connection/87608/1 "2022-07-25T17:13:54Z")

</div>

Hi There,  
I have configured Azure AD Enterprise connection for SSO and added users into Azure AD. I am able to setup SSO successfully but the issue I am facing is with user Email address sync.

User is getting successfully added in Auth0 on first login but it is not syncing user email address. I don’t see any value for email address upon checking the Row JSON of Azure AD user.

My Azure AD domain is - [janalighthousetimp.onmicrosoft.com](http://janalighthousetimp.onmicrosoft.com)

Following is the configuration of Azure AD connection:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/7/3/739a4d4fdc4f326b289e27074b06c0de59323d7f.png)

I am looking for some help on how to configure Azure AD Enterprise connection so that email address sync successfully.

Any help on this topic will be greatly appreciated. Thank you in advance

---

<div class="post-metadata">

**Author:** ![art.stupels](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/art.stupels/32/30429_2.png) [@art.stupels](https://community.auth0.com/u/art.stupels)\
**Post date:** [July 27, 2022, 12:46pm UTC](https://community.auth0.com/t/email-address-not-syncing-on-login-for-azure-ad-enterprise-connection/87608/2 "2022-07-27T12:46:44Z")

</div>

Hello!

Please check in [Azure Portal](https://portal.azure.com/#view/Microsoft_AAD_UsersAndTenants/UserManagementMenuBlade/~/AllUsers) if the user has an Email property.

If yes, please go to [Azure AD \> App registrations](https://portal.azure.com/#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/RegisteredApps) \> select an Application \> Token configuration and enable Email claim for the ID token. More on configuring optional claims in Azure [here](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-optional-claims#configuring-optional-claims).

Alternatively, you can create a Rule to map the UPN as EMAIL:

```auto
function (user, context, callback) {
  user.email = user.email || user.upn;
  callback(null, user, context);
}

```

---

<div class="post-metadata">

**Author:** ![VP003](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vp003/32/33660_2.png) [@VP003](https://community.auth0.com/u/VP003)\
**Post date:** [July 27, 2022, 4:57pm UTC](https://community.auth0.com/t/email-address-not-syncing-on-login-for-azure-ad-enterprise-connection/87608/3 "2022-07-27T16:57:29Z")

</div>

Thank you Art for your response.

After setting up Email property in Azure AD it is synching on login.

Thank you once again.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 28, 2022, 1:27pm UTC](https://community.auth0.com/t/email-address-not-syncing-on-login-for-azure-ad-enterprise-connection/87608/4 "2022-07-28T13:27:45Z")

</div>

Perfect, glad to hear that!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 28, 2022, 1:27pm UTC](https://community.auth0.com/t/email-address-not-syncing-on-login-for-azure-ad-enterprise-connection/87608/5 "2022-07-28T13:27:48Z")

</div>



---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [October 18, 2024, 8:54am UTC](https://community.auth0.com/t/email-address-not-syncing-on-login-for-azure-ad-enterprise-connection/87608/6 "2024-10-18T08:54:15Z")

</div>

Hi team!

We’ve updated our Knowledge Solutions with a chapter about Adding Claims with Action in a similar fashion to how Rules worked. You can find it here → [Azure AD Integration not Providing the User Email](https://community.auth0.com/t/azure-ad-integration-not-providing-the-user-email/88924#p-236269-add-claims-using-actions-6)

Thanks  
Dawid
