OfficeDev/office-js

getUserIdentityTokenAsync returning failed "An internal server error"

MrDaleQ opened this issue · 11 comments

Provide required information needed to triage your issue

##Your Environment
Platform [PC desktop, Mac, iOS, Office on the web]: Affects Outlook Desktop (classic) and Office on Web.
Host [Excel, Word, PowerPoint, etc.]: Outlook
Office version number: 16.0.17531.20120
Operating System: Windows 10
Browser (if using Office on the web): Edge

Expected behavior

When calling getUserIdentityTokenAsync a token is returned by Exchange Online

Current behavior

When calling getUserIdentityTokenAsync instead of returning a token it is returning failed.

Steps to reproduce

Currently attempting to repro

image

Context

This error prevents the Identity token being passed to our add-in, which prevents authentication by the user. This prevents use of the addin.

Hi @MrDaleQ
Please help us with the following queries so that we can debug this -

  1. How many users are affected by this?
  2. Can you collect logs and send it to us - https://github.com/OfficeDev/office-js/wiki/Collecting-log-files-for-Outlook-Add%E2%80%90ins-issues
  3. Please share your code snippet where you are using this API.
  4. If possible,please share a test account with us.

You can share this data on a GitHub private repo.

Hi @neprasad-microsoft

Thanks for the feedback - can I ask if there is a reason why instructions for Classic Outlook are not listed on the page? We're aware we can generate them in a similar manner to this, but this may be useful for other customers.

We're seeing this affecting small numbers of customers currently, and some are reporting this as fixed. We have a support call with a customer of around 8000 users today that is still reporting the issue.

The code snippet used by our dev team is as follows - the function in question has been in use for some time.

return new Promise(function (resolve, reject) { Office.context.mailbox.getUserIdentityTokenAsync( function (asyncResult) { if (asyncResult.status === Office.AsyncResultStatus.Failed) { reject(asyncResult.error); } else { resolve(asyncResult.value); } }); });

Hi @neprasad-microsoft

I have added you to my private repo and uploaded the har logs from an affected customer, with a screenshot of the dev console.

https://github.com/MrDaleQ/MSShare/issues/4

Hi @MrDaleQ
Is it possible for you to share the exact code snippets with us, where you have added log statements? Or if possible, can you share your manifest so that we can debug what is happening exactly.

Hi @neprasad-microsoft

You can get the manifest from outlook.signature365.com/manifest.xml

Hi @MrDaleQ
The logs which you shared do not have the corresponding logs which we log for getUserIdentityToken. Could you collect the logs again and send it to us? Start from Outlook Web load to opening your add-in till the error comes up. Wait for a few mins before stopping the log collection after the error.
I debugged with your add-in but for me the getUserIdentitytoken call is successful but later, I get the same error " url https://id.signature365.com/connect/token returned a status of: 400". The reason was different because my tenant is not allowed to connect to your resource.

@neprasad-microsoft

I believe Kwame has now taken up this case - from speaking to our dev team, when this error occurs getUserIdentityToken does not make a HTTP request, thus no error is generated.

Was this resolved?

@andrebel10 @neprasad-microsoft

This issue has not as yet been resolved from our customer feedback

@MrDaleQ Could you please share logs as mentioned by @neprasad-microsoft in comments above- The logs which you shared do not have the corresponding logs which we log for getUserIdentityToken. Could you collect the logs again and send it to us? Start from Outlook Web load to opening your add-in till the error comes up. Wait for a few mins before stopping the log collection after the error.

@mmanjaree-msft

It appears that all customers are now reporting that this error has been resolved by a later update to Outlook.