OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
685 stars 95 forks source link

Office.context.mailbox.getCallbackTokenAsync is failing with code 9018 'internal error has occured' #4156

Closed albaraks closed 8 months ago

albaraks commented 8 months ago

Our OWA addin stopped working due to Office.context.mailbox.getCallbackTokenAsync failing with code 9018 "GenericTokenError". This was working just fine for years. I tried it against my own consumer hotmail email account and it doesn't work any more.

Your Environment

Expected behavior

Get back a token to use in subsequent calls

Current behavior

Here is the network response from the browser debugger:

{ "Header": { "ServerVersionInfo": { "MajorVersion": 15, "MinorVersion": 20, "MajorBuildNumber": 7316, "MinorBuildNumber": 20, "Version": "V2018_01_08" } }, "Body": { "ResponseMessages": { "Items": [ { "type": "GetClientAccessTokenResponseMessage:#Exchange", "Token": null, "MessageText": "An internal server error occurred. The operation failed., One or more errors occurred.", "ResponseCode": "ErrorInternalServerError", "ResponseClass": "Error" }, { "type": "GetClientAccessTokenResponseMessage:#Exchange", "Token": null, "MessageText": "An internal server error occurred. The operation failed., One or more errors occurred.", "ResponseCode": "ErrorInternalServerError", "ResponseClass": "Error" } ] } } }

Steps to reproduce




Link to live example(s)

Provide additional details

Office.context.mailbox.getCallbackTokenAsync({ isRest: true }, function (result) { if (result.status === "succeeded") console.log("got token"); else console.log("failed to get token"); });

Context

Useful logs

Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.

ajays-msft commented 8 months ago

@albaraks - 1) Are you using a vanity domain? 2) Is this a consumer account, or enterprise account? 3) Is this working on other platforms (Old Outlook, New Outlook, Outlook Mac, iOS, Android)?

albaraks commented 8 months ago

No, it’s a certified domain with proper SSL. It has been working for few years and recently stopped working.

Consumer account

No, all platforms have stopped working with same issue

On Wed, Feb 21, 2024 at 9:55 AM Ajay Suri @.***> wrote:

@albaraks https://github.com/albaraks -

  1. Are you using a vanity domain?
  2. Is this a consumer account, or enterprise account?
  3. Is this working on other platforms (Old Outlook, New Outlook, Outlook Mac, iOS, Android)?

— Reply to this email directly, view it on GitHub https://github.com/OfficeDev/office-js/issues/4156#issuecomment-1957523550, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPXU4NIJRGY2LCZVR3LF7DYUYYJJAVCNFSM6AAAAABDTNSB5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJXGUZDGNJVGA . You are receiving this because you were mentioned.Message ID: @.***>

-- Best, Ahmed

Secure your emails and install Lockmagic browser extension https://chrome.google.com/webstore/detail/lockmagic-gmail-extension/gmginoamabjegaokkopplmenagbgdojn?hl=en-US to seamlessly send and open encrypted messages.

Visit Lockmagic.com https://Lockmagic.com/start.aspx for more information.

ajays-msft commented 8 months ago

@albaraks - Thank you for quick response. Can you please clarify what you mean certified domain? Does it mean a custom domain email which is powered by outlook.com behind the scenes?

albaraks commented 8 months ago

Certified domain means it’s our company domain name with proper ssl and we have apps registered in AAD . Like I mentioned, it was working just fine.

The API getUserIdentityToken works by the way but not getCallbackToken

The users email address domains are @hotmail.com and @outlook.com. Both don’t work. The email is not a custom domain address.

On Wed, Feb 21, 2024 at 10:06 AM Ajay Suri @.***> wrote:

@albaraks https://github.com/albaraks - Thank you for quick response. Can you please clarify what you mean certified domain? Does it mean a custom domain email which is powered by outlook.com behind the scenes?

— Reply to this email directly, view it on GitHub https://github.com/OfficeDev/office-js/issues/4156#issuecomment-1957564405, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPXU4N3VT7T75YTDYQSYHDYUYZRTAVCNFSM6AAAAABDTNSB5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJXGU3DINBQGU . You are receiving this because you were mentioned.Message ID: @.***>

-- Best, Ahmed

Secure your emails and install Lockmagic browser extension https://chrome.google.com/webstore/detail/lockmagic-gmail-extension/gmginoamabjegaokkopplmenagbgdojn?hl=en-US to seamlessly send and open encrypted messages.

Visit Lockmagic.com https://Lockmagic.com/start.aspx for more information.

ajays-msft commented 8 months ago

@albaraks -Re-stating my understanding. Your company is the addin developer with custom domain @customdomain.com (or something like that). Your users are add-in users who have @outlook.com @hotmail.com email and they use the addin. Your users are not enterprise users. They are consumer account users (means outlook.live.com)

Now, the question. 1) Is GetCallbackTokenAsync not working for you, when you use the addin with @customdomain.com ? OR 2) GetCallbackTokenAsync not working for your user when they are using the addin with @outlook.com ?

albaraks commented 8 months ago

Hi Ajay,

The answer is # 2. It's not working for users with @outlook.com and @hotmail.com.

Thanks & Regards

On Wed, Feb 21, 2024 at 8:26 PM Ajay Suri @.***> wrote:

@albaraks https://github.com/albaraks -Re-stating my understanding. Your company is the addin developer with custom domain @customdomain.com (or something like that). Your users are add-in users who have @outlook.com @hotmail.com email and they use the addin. Your users are not enterprise users. They are consumer account users (means outlook.live.com)

Now, the question.

  1. Is GetCallbackTokenAsync not working for you, when you use the addin with @customdomain.com ? OR
  2. GetCallbackTokenAsync not working for your user when they are using the addin with @outlook.com ?

— Reply to this email directly, view it on GitHub https://github.com/OfficeDev/office-js/issues/4156#issuecomment-1958677603, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPXU4PJ2GIOOYWYGUY5MFDYU3CHBAVCNFSM6AAAAABDTNSB5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJYGY3TONRQGM . You are receiving this because you were mentioned.Message ID: @.***>

-- Best, Ahmed

Secure your emails and install Lockmagic browser extension https://chrome.google.com/webstore/detail/lockmagic-gmail-extension/gmginoamabjegaokkopplmenagbgdojn?hl=en-US to seamlessly send and open encrypted messages.

Visit Lockmagic.com https://Lockmagic.com/start.aspx for more information.

albaraks commented 8 months ago

Hi Ajay,

Any progress on this?

On Wed, Feb 21, 2024 at 8:28 PM Ahmed T @.***> wrote:

Hi Ajay,

The answer is # 2. It's not working for users with @outlook.com and @hotmail.com.

Thanks & Regards

On Wed, Feb 21, 2024 at 8:26 PM Ajay Suri @.***> wrote:

@albaraks https://github.com/albaraks -Re-stating my understanding. Your company is the addin developer with custom domain @customdomain.com (or something like that). Your users are add-in users who have @outlook.com @hotmail.com email and they use the addin. Your users are not enterprise users. They are consumer account users (means outlook.live.com)

Now, the question.

  1. Is GetCallbackTokenAsync not working for you, when you use the addin with @customdomain.com ? OR
  2. GetCallbackTokenAsync not working for your user when they are using the addin with @outlook.com ?

— Reply to this email directly, view it on GitHub https://github.com/OfficeDev/office-js/issues/4156#issuecomment-1958677603, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPXU4PJ2GIOOYWYGUY5MFDYU3CHBAVCNFSM6AAAAABDTNSB5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJYGY3TONRQGM . You are receiving this because you were mentioned.Message ID: @.***>

-- Best, Ahmed

Secure your emails and install Lockmagic browser extension https://chrome.google.com/webstore/detail/lockmagic-gmail-extension/gmginoamabjegaokkopplmenagbgdojn?hl=en-US to seamlessly send and open encrypted messages.

Visit Lockmagic.com https://Lockmagic.com/start.aspx for more information.

-- Best, Ahmed

Secure your emails and install Lockmagic browser extension https://chrome.google.com/webstore/detail/lockmagic-gmail-extension/gmginoamabjegaokkopplmenagbgdojn?hl=en-US to seamlessly send and open encrypted messages.

Visit Lockmagic.com https://Lockmagic.com/start.aspx for more information.

ajays-msft commented 8 months ago

We are investigating this issue, and will provide an update when available.

albaraks commented 8 months ago

Hi Ajay,

Any progress on this? Our clients are not unable to access the addin.

Thanks for your help, Ahmed

On Fri, Feb 23, 2024 at 9:20 PM Ajay Suri @.***> wrote:

We are investigating this issue, and will provide an update when available.

— Reply to this email directly, view it on GitHub https://github.com/OfficeDev/office-js/issues/4156#issuecomment-1962259808, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPXU4MBRXZYTPMSFFITSYLYVF2A3AVCNFSM6AAAAABDTNSB5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRSGI2TSOBQHA . You are receiving this because you were mentioned.Message ID: @.***>

-- Best, Ahmed

Secure your emails and install Lockmagic browser extension https://chrome.google.com/webstore/detail/lockmagic-gmail-extension/gmginoamabjegaokkopplmenagbgdojn?hl=en-US to seamlessly send and open encrypted messages.

Visit Lockmagic.com https://Lockmagic.com/start.aspx for more information.

albaraks commented 8 months ago

Any update on this?

On Mon, Feb 26, 2024 at 10:35 PM Ahmed T @.***> wrote:

Hi Ajay,

Any progress on this? Our clients are not unable to access the addin.

Thanks for your help, Ahmed

On Fri, Feb 23, 2024 at 9:20 PM Ajay Suri @.***> wrote:

We are investigating this issue, and will provide an update when available.

— Reply to this email directly, view it on GitHub https://github.com/OfficeDev/office-js/issues/4156#issuecomment-1962259808, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPXU4MBRXZYTPMSFFITSYLYVF2A3AVCNFSM6AAAAABDTNSB5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRSGI2TSOBQHA . You are receiving this because you were mentioned.Message ID: @.***>

-- Best, Ahmed

Secure your emails and install Lockmagic browser extension https://chrome.google.com/webstore/detail/lockmagic-gmail-extension/gmginoamabjegaokkopplmenagbgdojn?hl=en-US to seamlessly send and open encrypted messages.

Visit Lockmagic.com https://Lockmagic.com/start.aspx for more information.

-- Best, Ahmed

Secure your emails and install Lockmagic browser extension https://chrome.google.com/webstore/detail/lockmagic-gmail-extension/gmginoamabjegaokkopplmenagbgdojn?hl=en-US to seamlessly send and open encrypted messages.

Visit Lockmagic.com https://Lockmagic.com/start.aspx for more information.

ajays-msft commented 8 months ago

The issue is now resolved. Please feel free to comment and re-open if you still see the issue, with specific repro steps.