{"action":"created","issue":{"url":"https://api.github.com/repos/jasonjoh/python_tutorial/issues/4","repository_url":"https://api.github.com/repos/jasonjoh/python_tutorial","labels_url":"https://api.github.com/repos/jasonjoh/python_tutorial/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/jasonjoh/python_tutorial/issues/4/comments","events_url":"https://api.github.com/repos/jasonjoh/python_tutorial/issues/4/events","html_url":"https://github.com/jasonjoh/python_tutorial/issues/4","id":136413416,"number":4,"title":"Current response with JWT differs from one's expected in tutorial example","user":{"login":"psihonavt","id":703402,"avatar_url":"https://avatars.githubusercontent.com/u/703402?v=3","gravatar_id":"","url":"https://api.github.com/users/psihonavt","html_url":"https://github.com/psihonavt","followers_url":"https://api.github.com/users/psihonavt/followers","following_url":"https://api.github.com/users/psihonavt/following{/other_user}","gists_url":"https://api.github.com/users/psihonavt/gists{/gist_id}","starred_url":"https://api.github.com/users/psihonavt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psihonavt/subscriptions","organizations_url":"https://api.github.com/users/psihonavt/orgs","repos_url":"https://api.github.com/users/psihonavt/repos","events_url":"https://api.github.com/users/psihonavt/events{/privacy}","received_events_url":"https://api.github.com/users/psihonavt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-25T15:05:31Z","updated_at":"2016-02-26T21:34:30Z","closed_at":null,"body":"Hello,\r\n\r\nToday, our auth code (which is based on this tutorials) for Outlook accounts started to crash, because JWT format had changed. Currently it looks like:\r\n```javascript\r\n{\r\nu'ver': u'2.0', \r\nu'aud': u'b27e9f81-dbc4-4d4a-923a-3eacaae45241', \r\nu'iss': u'https://login.microsoftonline.com/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0', \r\nu'at_hash': u'A9zHQW2pywcdHzwmqdcGpg', \r\nu'exp': 1456497726, \r\nu'tid': u'9188040d-6c67-4c5b-b112-36a304b66dad', \r\nu'iat': 1456411326, \r\nu'sub': u'AAAAAAAAAAAAAAAAAAAAAEd_FVIeg7D50-KulnCFDGo'\r\n}\r\n```\r\nFields `preferred_username` and `name` are absent. Quick googling gives nothing ... documentation on Microsoft's dev portal also does not display any updates. \r\nCan you shed some light on this?\r\nThanks a lot."},"comment":{"url":"https://api.github.com/repos/jasonjoh/python_tutorial/issues/comments/189490469","html_url":"https://github.com/jasonjoh/python_tutorial/issues/4#issuecomment-189490469","issue_url":"https://api.github.com/repos/jasonjoh/python_tutorial/issues/4","id":189490469,"user":{"login":"jasonjoh","id":8966342,"avatar_url":"https://avatars.githubusercontent.com/u/8966342?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonjoh","html_url":"https://github.com/jasonjoh","followers_url":"https://api.github.com/users/jasonjoh/followers","following_url":"https://api.github.com/users/jasonjoh/following{/other_user}","gists_url":"https://api.github.com/users/jasonjoh/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonjoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonjoh/subscriptions","organizations_url":"https://api.github.com/users/jasonjoh/orgs","repos_url":"https://api.github.com/users/jasonjoh/repos","events_url":"https://api.github.com/users/jasonjoh/events{/privacy}","received_events_url":"https://api.github.com/users/jasonjoh/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T21:34:30Z","updated_at":"2016-02-26T21:34:30Z","body":"Yes, Azure made a breaking change to the v2 endpoint, which they announced on [their blog](https://blogs.technet.microsoft.com/ad/2016/01/27/for-developers-important-upcoming-changes-to-the-v2-0-auth-protocol/).\r\n\r\nBasically they don't return that field in the JWT unless you specifically request the `profile` scope in addition to the other scopes you request in the auth request. This notifies the user that you'll see their basic profile.\r\n\r\nSee this post: http://stackoverflow.com/questions/35605103/can-not-get-signed-in-email-using-office-365-rest-api/35605630.\r\n\r\nI'll push a fix to the tutorial shortly."}}