无法在移动设备上使用 getAccessTokenAsync

Cannot use getAccessTokenAsync on Mobile

我创建了一个 Office.js 加载项,可以在 OWA 和 Outlook 桌面应用程序上正常运行。但是,在 iOS 和 Android 的 Outlook 应用程序上,我收到此错误:

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

如果我打算在移动设备上使用插件,是否可以不使用功能 Office.context.auth.getAccessTokenAsync?如果允许,那么我该怎么做才能解决此错误?我也尝试过使用 Promise.resolve(OfficeRuntime.auth.getAccessToken()),但出现此错误 -

ReferenceError: OfficeRuntime is not defined

getAccessTokenAsync 是 IdentityAPI 1.3 的一部分,尚不适用于 Outlook Mobile。您可以在不同平台 here.

的 Outlook 上查看支持的 API 集列表