Outlook Add-in for Android :Exception trying to access userProfile. Elevated Permission required to access protected members of Javascript API-Office

霸气de小男生 提交于 2019-12-13 03:46:48

问题


We have noticed that when we try to access Office.context.mailbox.userProfile in order to get the Logged in user email address and display name, we are getting an exception and the app doesn't load. The Add-in works properly on :

  • Web client Windows and Mac
  • Desktop platform app Windows and Mac
  • iOS Outlook Mobile app

The office documentation mentions, userProfile is accessible for [ API set: Mailbox 1.0 ] https://docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office.context.mailbox.userprofile?view=office-js

We are targeting the API Version 1.3, which supports Outlook for Android. https://docs.microsoft.com/en-us/javascript/office/requirement-sets/outlook-api-requirement-sets?view=office-js

It used to work on Android as well till a week before. But suddenly we are seeing this error.

Error : Elevated Permissions is required to access Protected members of the Javascript API for office.

Failed to load user profile data

We tried to query the userProfile on console using window.Office.context.mailbox.userProfile It returns the same Error. Error when query userprofile on console

Also, if we query window.Office.context.mailbox and check the permissions on the userProfile object, it shows Permissions 0. Permissions 0 for userProfile object

What could be the issue here ?


回答1:


Sorry for inconvenience, This issue has been fixed few days ago, Soon it will start working again as solution will be included in production build. Issue was at framework side of Android Outlook Add-ins. It was providing message context with wrong permission.



来源:https://stackoverflow.com/questions/52697160/outlook-add-in-for-android-exception-trying-to-access-userprofile-elevated-per

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!