none
Call to getUserIdentityTokenAsync() returning a null token RRS feed

  • Question

  • We have an addin in production where intermittently the call to getUserIdentityTokenAsync() fails and returns a null token.

    The response is "Status" = "failed", Error = {message: "An internal error has occurred", name: "Internal Error"}.

    Would anyone know what could cause this type of failure? Certain users always get the error, and we have never seen the error locally or during development.


    • Edited by AdamHickey Monday, October 2, 2017 2:28 PM
    Monday, October 2, 2017 2:28 PM

All replies

  • Hello,

    When would you get the error?  Do you get the error for new created item? Do you save it as draft before getting the token?

    Please visit the similar thread:

    https://social.msdn.microsoft.com/Forums/office/en-US/fff0581d-ef00-46ae-b2b7-d25f41ba9dba/officecontextmailboxgetcallbacktokenasyncisrest-true-returns-an-internal-error-has?forum=outlookdev

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, October 3, 2017 4:47 AM
    Moderator
  • That thread refers to the getCallbackTokenAsync() method. I am getting the error trying to get an identity token getUserIdentityTokenAsync().

    I should be able to get an identity token whether or not the mail is saved as a draft. Also, this call works for 99.9% of our users. It is only particular users getting the error.


    • Edited by AdamHickey Tuesday, October 3, 2017 1:09 PM
    Tuesday, October 3, 2017 1:08 PM
  • Hello,

    Could you narrow down the issue causes by the user account or the specific environment?

    Do you test the method in OWA?

    If it works in OWA but fails in Outlook desktop, you may compare the Outlook version to check if any updates cause the issue.

    If it still fails and only this account fails to get token, please check if the account has any special.

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, October 4, 2017 9:13 AM
    Moderator
  • Hi AdamHickey,

    I made a test with below code under Outlook Web App, it works correctly.

      function getIdentityToken() {
          Office.context.mailbox.getUserIdentityTokenAsync(cb);
      }
    
      function cb(asyncResult) {
          var token = asyncResult.value;
          showNotification("IdentityToken", token);
      }

    Could you share us more information about your issue? Did you get this error on Outlook Desktop or Online?

    To check whether it is related with the account, I suggest you login the non-worked account on working computer.

    To check whether it is related with this AddIn, I suggest you create a new addin with above simple code.

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, October 9, 2017 9:02 AM