BigDataFiles
BigDataFiles

Reputation: 185

Cannot use getAccessTokenAsync on Mobile

I created an Office.js add-in that works fine on OWA and Outlook desktop app. But, on the Outlook app for iOS and Android, I receive this error:

TypeError: Cannot read proerties of undefined (reading 'getAccessTokenAsync')

Can I not use the function Office.context.auth.getAccessTokenAsync if I plan on using the add-in on mobile? If it is allowed, then what can I do to get around this error? I've also tried using Promise.resolve(OfficeRuntime.auth.getAccessToken()), but got this error -

ReferenceError: OfficeRuntime is not defined

Upvotes: 0

Views: 408

Answers (1)

user7823505
user7823505

Reputation:

getAccessTokenAsync is a part of IdentityAPI 1.3 and is not available for Outlook Mobile yet. You can see the list of supported API sets on Outlook for different platforms here.

Upvotes: 1

Related Questions