Outlook Add-In SSO "13012 API is not supported in this platform"

ChristophB 6 Reputation points
2022-05-18T14:23:33.817+00:00

Hi

We have an Outlook Add-In and try to use getAccessToken to authorize a backend API to access MS Graph (OBO-flow).

The app registration in Azure seems to be set up right, as the getAccessToken call works fine in Web and the resulting token can be used by the backend to retrieve a valid access token and access Graph.

When we try this in Outlook Desktop I receive the error no 13012 and the message "API is not supported in this platform."

Modern authentication is enabled by the administrator.

Thanks in advance for the help!

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,345 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Avishek Avin Nand 1 Reputation point
    2022-07-21T23:56:26.46+00:00

    Hi Chris,

    According the office.js team if you are using forMSGraphAccess: true as the parameter for getaccesstoken() then you are expected to see the 13102 error.

    This is due to you have side loaded the addin, if you are using forMSGraphAccess: true you need to deploy the add-in via the admin center.

    Please go through the git issue i raised: https://github.com/OfficeDev/office-js/issues/2711

    You can set forMSGraphAccess: false and call the getaccesstoken() and you will no longer see the 13102 error. The good thing is that you can still use the token to make Graph API Call. I hope this helps you.

    0 comments No comments

Your answer

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