# Discourse Azure AD Plugin not working

**URL:** <https://meta.discourse.org/t/discourse-azure-ad-plugin-not-working/65249>\
**Category:** Product Support\
**Created:** [Juin 28, 2017, 6:05 UTC](https://meta.discourse.org/t/discourse-azure-ad-plugin-not-working/65249 "2017-06-28T06:05:32Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Ryan\_Nix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryan_nix/32/78712_2.png) [@Ryan\_Nix](https://meta.discourse.org/u/Ryan_Nix)\
**Post date:** [Septembre 14, 2017, 11:36 UTC](https://meta.discourse.org/t/discourse-azure-ad-plugin-not-working/65249/9 "2017-09-14T11:36:04Z")

</div>

Followup question for @Chanka_Dod and @sam: The oAuth plug-in is working great, except one thing: The user’s email address is incorrect. The plug-in is populating the email address as the short name and the Active Directory domain, neither of which are correct. Example my email address is [r-nix@mycollege.edu](mailto:r-nix@mycollege.edu) but the oAuth plugin is making the email address [rtn456@ad.mycollege.edu](mailto:rtn456@ad.mycollege.edu). Is there a way to add something to the code that populates the user account as the ‘mail’ attribute in LDAP or Active Directory.

---

_[View the full topic](https://meta.discourse.org/t/discourse-azure-ad-plugin-not-working/65249)._
