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

Patrick Willmann 0 Reputation points
2024-06-17T18:58:25.67+00:00

I am working on a previously fully-functional Outlook Add-in that is having issues retrieving the ExchangeIdentityToken only for some Outlook accounts. This issue was first encountered on June 14th, 2024. However, our logs show that a similar error also occurred on March 18th, 2024, but disappeared thereafter.

No changes have been made to the add-in code recently.

On initializing the add-in, the function mailbox.getUserIdentityTokenAsync() is called:

var _mailbox = Office.context.mailbox;
_mailbox.getUserIdentityTokenAsync(function (asyncResult) { 
//...

Using a test account which performs without issue, a token is successfully retrieved to be passed into our service for validation.

However, on some test accounts, this call is failing with a response:

error: OSF.DDA.Error 
Code: 9018
message: "An internal error has occurred."
name: "GenericTokenError"
status: "failed"
value: undefined

No clear pattern has emerged yet in terms of which Outlook accounts show this error and which ones do not. Note that all Outlook test accounts thus far have been personal accounts - not business accounts, ranging in age from newly created, to 10+ years old.

During my research, I did find a similar error occurring specifically for accounts with Shared Inbox enabled (since closed and resolved, apparently) However, none of the test accounts in which this call is failing has shared inbox enabled.

Note: Submitted an issue to GitHub as well: https://github.com/OfficeDev/office-js/issues/4583

Microsoft 365 and Office | Development | Other
Outlook | Windows | Classic Outlook for Windows | For business
Microsoft 365 and Office | Install, redeem, activate | For business | Windows
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.