Share via

Issue with Office.context.mailbox.getCallbackTokenAsync for Shared mailbox

Sahana R 5 Reputation points
2023-11-17T06:24:20.5466667+00:00
I'm encountering an issue with the Office.context.mailbox.getCallbackTokenAsync function in my Office Add-in from office 365. The function works fine for a non-shared inbox but returns an error for a shared inbox.

Below is the code I am using

Office.context.mailbox.getCallbackTokenAsync(
            { isRest: true },
            (result: any) => {
            
                if (result.status === "succeeded") {
                    var accessToken = result.value;
                    this.getWebUrl()
                        .then((itemId) => {         
                } else {
                    reject(result);
                });
            
Error Message:

OSF.DDA.Error {name: 'GenericTokenError', message: 'An internal error has occurred.', code: 9018}

Scenario: Works for non-shared inbox, but fails for Shared inbox.

Expected Outcome: Successful retrieval of access token for shared inbox.

Questions:

Has anything changed with "getCallbackTokenAsync" recently that might affect its behavior with shared inboxes?

Are there specific permissions or configurations required for accessing shared mailboxes using "getCallbackTokenAsync"?

Can anyone please suggest any solution to this or anything that would help me resolve this?
Microsoft 365 and Office | Development | Other
Outlook | Windows | Classic Outlook for Windows | For business
Microsoft 365 and Office | Install, redeem, activate | For business | Windows

Your answer

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