{"action":"created","issue":{"url":"https://api.github.com/repos/Requarks/wiki/issues/307","repository_url":"https://api.github.com/repos/Requarks/wiki","labels_url":"https://api.github.com/repos/Requarks/wiki/issues/307/labels{/name}","comments_url":"https://api.github.com/repos/Requarks/wiki/issues/307/comments","events_url":"https://api.github.com/repos/Requarks/wiki/issues/307/events","html_url":"https://github.com/Requarks/wiki/issues/307","id":271430722,"node_id":"MDU6SXNzdWUyNzE0MzA3MjI=","number":307,"title":"Azure Active Directory Authentication issue","user":{"login":"PhilipCotan","id":16327924,"node_id":"MDQ6VXNlcjE2MzI3OTI0","avatar_url":"https://avatars0.githubusercontent.com/u/16327924?v=4","gravatar_id":"","url":"https://api.github.com/users/PhilipCotan","html_url":"https://github.com/PhilipCotan","followers_url":"https://api.github.com/users/PhilipCotan/followers","following_url":"https://api.github.com/users/PhilipCotan/following{/other_user}","gists_url":"https://api.github.com/users/PhilipCotan/gists{/gist_id}","starred_url":"https://api.github.com/users/PhilipCotan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhilipCotan/subscriptions","organizations_url":"https://api.github.com/users/PhilipCotan/orgs","repos_url":"https://api.github.com/users/PhilipCotan/repos","events_url":"https://api.github.com/users/PhilipCotan/events{/privacy}","received_events_url":"https://api.github.com/users/PhilipCotan/received_events","type":"User","site_admin":false},"labels":[{"id":425873363,"node_id":"MDU6TGFiZWw0MjU4NzMzNjM=","url":"https://api.github.com/repos/Requarks/wiki/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"closed","locked":false,"assignee":{"login":"NGPixel","id":15522395,"node_id":"MDQ6VXNlcjE1NTIyMzk1","avatar_url":"https://avatars3.githubusercontent.com/u/15522395?v=4","gravatar_id":"","url":"https://api.github.com/users/NGPixel","html_url":"https://github.com/NGPixel","followers_url":"https://api.github.com/users/NGPixel/followers","following_url":"https://api.github.com/users/NGPixel/following{/other_user}","gists_url":"https://api.github.com/users/NGPixel/gists{/gist_id}","starred_url":"https://api.github.com/users/NGPixel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NGPixel/subscriptions","organizations_url":"https://api.github.com/users/NGPixel/orgs","repos_url":"https://api.github.com/users/NGPixel/repos","events_url":"https://api.github.com/users/NGPixel/events{/privacy}","received_events_url":"https://api.github.com/users/NGPixel/received_events","type":"User","site_admin":false},"assignees":[{"login":"NGPixel","id":15522395,"node_id":"MDQ6VXNlcjE1NTIyMzk1","avatar_url":"https://avatars3.githubusercontent.com/u/15522395?v=4","gravatar_id":"","url":"https://api.github.com/users/NGPixel","html_url":"https://github.com/NGPixel","followers_url":"https://api.github.com/users/NGPixel/followers","following_url":"https://api.github.com/users/NGPixel/following{/other_user}","gists_url":"https://api.github.com/users/NGPixel/gists{/gist_id}","starred_url":"https://api.github.com/users/NGPixel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NGPixel/subscriptions","organizations_url":"https://api.github.com/users/NGPixel/orgs","repos_url":"https://api.github.com/users/NGPixel/repos","events_url":"https://api.github.com/users/NGPixel/events{/privacy}","received_events_url":"https://api.github.com/users/NGPixel/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2017-11-06T10:45:16Z","updated_at":"2018-07-20T19:07:13Z","closed_at":"2018-02-23T23:54:46Z","author_association":"NONE","body":"### Issue steps\r\n\r\nAfter setting up AAD Auth, login doesn't work because the system cannot find the user email in the json object returned from Azure. \r\n\r\n### Fix\r\nIn order to fix this issue, in **./server/models/user.js** I had to make the following changes on lines 54-55:\r\n\r\n<p><i><strong>} else if (_.isString(profile.unique_name) && profile.unique_name.length > 5) {  \r\n<br>primaryEmail = profile.unique_name </strong></i></p>\r\n\r\n\r\nBecause in the Azure response object, the user email is stored in **unique_name** property instead of _email, emails or mail_."},"comment":{"url":"https://api.github.com/repos/Requarks/wiki/issues/comments/406699269","html_url":"https://github.com/Requarks/wiki/issues/307#issuecomment-406699269","issue_url":"https://api.github.com/repos/Requarks/wiki/issues/307","id":406699269,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjY5OTI2OQ==","user":{"login":"ekaragic","id":14839334,"node_id":"MDQ6VXNlcjE0ODM5MzM0","avatar_url":"https://avatars0.githubusercontent.com/u/14839334?v=4","gravatar_id":"","url":"https://api.github.com/users/ekaragic","html_url":"https://github.com/ekaragic","followers_url":"https://api.github.com/users/ekaragic/followers","following_url":"https://api.github.com/users/ekaragic/following{/other_user}","gists_url":"https://api.github.com/users/ekaragic/gists{/gist_id}","starred_url":"https://api.github.com/users/ekaragic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekaragic/subscriptions","organizations_url":"https://api.github.com/users/ekaragic/orgs","repos_url":"https://api.github.com/users/ekaragic/repos","events_url":"https://api.github.com/users/ekaragic/events{/privacy}","received_events_url":"https://api.github.com/users/ekaragic/received_events","type":"User","site_admin":false},"created_at":"2018-07-20T19:07:13Z","updated_at":"2018-07-20T19:07:13Z","author_association":"NONE","body":"Confirmed that issue is fixed."}}
{"actor":{"display_login":"ekaragic"}}