{"action":"opened","issue":{"url":"https://api.github.com/repos/OfficeDev/office-js-docs/issues/258","repository_url":"https://api.github.com/repos/OfficeDev/office-js-docs","labels_url":"https://api.github.com/repos/OfficeDev/office-js-docs/issues/258/labels{/name}","comments_url":"https://api.github.com/repos/OfficeDev/office-js-docs/issues/258/comments","events_url":"https://api.github.com/repos/OfficeDev/office-js-docs/issues/258/events","html_url":"https://github.com/OfficeDev/office-js-docs/issues/258","id":157569166,"number":258,"title":"Office.context.ui is undefined","user":{"login":"rolandoldengarm","id":14539000,"avatar_url":"https://avatars.githubusercontent.com/u/14539000?v=3","gravatar_id":"","url":"https://api.github.com/users/rolandoldengarm","html_url":"https://github.com/rolandoldengarm","followers_url":"https://api.github.com/users/rolandoldengarm/followers","following_url":"https://api.github.com/users/rolandoldengarm/following{/other_user}","gists_url":"https://api.github.com/users/rolandoldengarm/gists{/gist_id}","starred_url":"https://api.github.com/users/rolandoldengarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rolandoldengarm/subscriptions","organizations_url":"https://api.github.com/users/rolandoldengarm/orgs","repos_url":"https://api.github.com/users/rolandoldengarm/repos","events_url":"https://api.github.com/users/rolandoldengarm/events{/privacy}","received_events_url":"https://api.github.com/users/rolandoldengarm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-31T00:23:33Z","updated_at":"2016-05-31T00:23:33Z","closed_at":null,"body":"I'm following the dialog oauth example from [here](https://github.com/Microsoft-Build-2016/CodeLabs-Office/tree/master/Module3-OfficeAddins).\r\nI'm using it in an Angular app. My auth.js code looks like this:\r\n````\r\n$scope.$on(\"adal:loginSuccess\", function () {\r\n            Office.context.ui.messageParent(\"success\");\r\n        });\r\n\r\n        $scope.$on(\"adal:loginFailure\", function () {            \r\n            Office.context.ui.messageParent(\"error\");\r\n        });\r\n\r\n        // optional\r\n        $scope.$on(\"adal:notAuthorized\", function (event, rejection, forResource) {\r\n            Office.context.ui.messageParent(\"error\");\r\n        });\r\n        $scope.signIn = function () {\r\n            var user = adalAuthenticationService.getCachedToken();\r\n\r\n            // Check if the user is cached\r\n            if (!user) {\r\n                adalAuthenticationService.login();\r\n            }\r\n});\r\n````\r\nThe issue is that after logging in, adal:loginSuccess fires, but in there Office.context.ui is undefined. What can I do about it?"}}
{"actor":{"display_login":"rolandoldengarm"}}