0

I'm working on an Outlook Add-in that has additional features for user that have a mailbox provided by their Microsoft 365 subscription.

For the most part we can detect Microsoft 365 subscriptions using the following call in office.js Office.context.mailbox.userProfile?.accountType == 'office365'. This works using the accountType property added in requirement set 1.6 and above. To support mobile users is there an alternative way of doing this detection on Outlook for iOS or Android which only currently supports requirement set 1.5?

Phillip
  • 1
  • 1
  • With further reading I found this comment on a similar issue https://stackoverflow.com/questions/49155326/fetching-mail-provider-type-in-outlook-web-addin#comment85414030_49155326 from the Outlook Add-on team. It suggests using `Office.context.mailbox.ewsUrl == 'outlook.office365.com'` as a proxy for `Office.context.mailbox.userProfile?.accountType == 'office365'`. But suggest there may be additional URLs that need to be checked. – Phillip Mar 01 '21 at 13:18
  • It appears that `Office.context.mailbox.ewsUrl` isn't populated correctly on iOS and Android builds. So the work around suggested above doesn't work. – Phillip Mar 02 '21 at 16:40
  • Yes confirmed that `Office.context.mailbox.ewsUrl` isn't available on iOS or Android apps https://learn.microsoft.com/en-us/javascript/api/outlook/office.mailbox?view=outlook-js-preview#ewsUrl . – Phillip Mar 02 '21 at 17:37
  • There is another article that suggests using `Office.context.mailbox.restUrl` which does present correctly on Mobile versions of Outlook. However with some more investigation and testing Outlook.com presents using one of the standard Microsoft 365 endpoints so I can't tell the difference between an Outlook.com account and a Microsoft 365 subscription using this technique. Using `mailbox.ewsUrl` and `mailbox.restUrl` have both turned out to be dead ends. – Phillip Mar 03 '21 at 11:17
  • **UPDATE** We've given up trying to resolve this in the front-end and instead made an API service call to check to see if the customer has the features provided by Microsoft 365 support. – Phillip Jul 14 '21 at 14:37

0 Answers0