Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AzureAD: Support email, when userPrincipalName (upn) is not available #289

Merged
merged 1 commit into from Mar 13, 2017

Conversation

@taktran
Copy link
Contributor

taktran commented Jan 11, 2017

Support the email field, when userPrincipalName is not available.

From the Azure Active Directory graph API documentation about userPrincipalName (upn):

This property is required when a work or school account is created; it is optional for local accounts.

https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#contact-entity

When upn is not available, profile.email stores the email, so fall back on this value.

Have tested on an account created from live.com, where the email value exists there, but not upn.

@ldesplat ldesplat added the feature label Jan 26, 2017
@ldesplat ldesplat added this to the 8.5.1 milestone Mar 13, 2017
@ldesplat

This comment has been minimized.

Copy link
Contributor

ldesplat commented Mar 13, 2017

Thanks for the PR. It finally makes it in :)

@ldesplat ldesplat merged commit 4426d64 into hapijs:master Mar 13, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.