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

Azure Active Directory Authentication issue #307

Closed
PhilipCotan opened this Issue Nov 6, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@PhilipCotan
Copy link

PhilipCotan commented Nov 6, 2017

Issue steps

After setting up AAD Auth, login doesn't work because the system cannot find the user email in the json object returned from Azure.

Fix

In order to fix this issue, in ./server/models/user.js I had to make the following changes on lines 54-55:

} else if (_.isString(profile.unique_name) && profile.unique_name.length > 5) {
primaryEmail = profile.unique_name

Because in the Azure response object, the user email is stored in unique_name property instead of email, emails or mail.

@NGPixel NGPixel self-assigned this Nov 7, 2017

@NGPixel NGPixel added the bug label Nov 7, 2017

@barry-luijten

This comment has been minimized.

Copy link

barry-luijten commented Nov 17, 2017

Inserting these lines (version 1.0.11) before line 60 of server/models/user.js:

 } else if (profile.unique_name && profile.unique_name.length > 5) {
    primaryEmail = profile.unique_name

And changing line 76 to:
name: profile.displayName || profile.name || profile.cn || _.split(primaryEmail, '@')[0]
... fixed the issue for me....

@barry-luijten

This comment has been minimized.

Copy link

barry-luijten commented Feb 7, 2018

Bug still exists in version 1.0.68... Please fix this, it's about 2 minutes work ;)

@NGPixel

This comment has been minimized.

Copy link
Member

NGPixel commented Feb 23, 2018

Fixed in 1.0.78.

@NGPixel NGPixel closed this Feb 23, 2018

@ekaragic

This comment has been minimized.

Copy link

ekaragic commented Jul 20, 2018

Confirmed that issue is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment