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
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
4,322 questions
Outlook
Outlook
A family of Microsoft email and calendar products.
3,401 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,707 questions
{count} votes