OfficeDev / office-js

A repository for issues related to the Office JavaScript APIs and Office Add-ins platform. Find the Office.js library in Office.js CDN: https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
716 stars 103 forks source link

Outlook Add-in - Call to mailbox.getUserIdentityTokenAsync returning undefined token for only some Outlook accounts #5487

Open madhukar4e opened 3 days ago

madhukar4e commented 3 days ago

I am working on a previously fully-functional Outlook Add-in that is having issues retrieving the mailbox.getUserIdentityTokenAsync only for some Outlook accounts.

Your Environment

Expected behavior

All Outlook accounts are able to successfully retrieve an ExchangeIdentityToken upon calling: Office.context.mailbox.getUserIdentityTokenAsync()

Current behavior

Some accounts (no discernable pattern) fail to retrieve the token and produce the following error response: "Internal protocol error: '-2147467259'." and "AccessRestricted".

Steps to reproduce

  1. Use a random Outlook test account
  2. Initialize add-on with call to Office.context.mailbox.getUserIdentityTokenAsync()
  3. Check (using web inspector or debugger) to see if a token has sent in the response.
github-actions[bot] commented 3 days ago

Here are some similar issues that might help you. Please check if they can solve your problem.

Possible solution (Extracted from existing issue, might be incorrect; please verify carefully)

Solution 1:

This should be resolved. Please let us know how that looks for you now. Apologies for the disruption.

Reference:

Reference:

Reference:

Powered by issue-sentinel

madhukar4e commented 3 days ago
Image