outlookoffice-jsoutlook-web-addinsoffice-js-helpers

BootstrapToken forMSGraphAccess in Outlook


I want to use SSO in Outlook to get the BookstrapToken with MSGrapAccess and I'm getting the error "13012". In the documentation says that this error is only possible while sideloading, but I also get it once I deploy the addin.

I'm not doing anything special:

bootstrapToken = await OfficeRuntime.auth.getAccessToken({ allowSignInPrompt: true, allowConsentPrompt: true, forMSGraphAccess: true });

This is the error I get:

{code: 13012, message: "API is not supported in this platform.", name: "API Not Supported"}

All the permissions are granted in Azure.

Is it possible to get the BootstrapToken foMSGraphAccess or I need to use a different sign in method?

Thank you


Solution

  • I found the way to make it work with the parameter. The problem was that I was using allowConsentPrompt and forMSGraphAccess at the same time. Without allowConsentPrompt, I can use forMSGraphAccess with no problem.