• Resolved markluprin

    (@markluprin)


    {{code":"UnauthorizedException","message":"Please sign in with Microsoft first before using this API.","data":{"status":401}}

    Good afternoon, I configured everything strictly according to the instructions for installing / integrating / configuring the plugin.
    After outputting the shorcode, it gives the following error.
    Can you help me figure out what I’m doing wrong and where I set it up?

    • This topic was modified 1 year, 7 months ago by markluprin.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Marco van Wieren

    (@wpo365)

    Hi @markluprin

    Sorry to see that things are not yet working as expected!

    It’s difficult to recognize what Microsoft 365 app for WordPress you want to embed, but let’s assume you want to embed Power BI content. In that case, I recommend that you have another look at this article and then scroll to the paragraph title Integration. There is an option to let you select whether users that use the built-in WPO365 API to access Microsoft 365 services must sign in with Microsoft before they can use the API. Apparently, you have set this option to Users must be signed in with Microsoft. So to deal with the error you reported, you yourself must also have signed in with Microsoft, to test the embedded app.

    Hope this helps!

    -Marco

    Thread Starter markluprin

    (@markluprin)

    Yes, I saw this setting, I set the value to “Allow annonymous access”, but everything exactly gives this error.

    • This reply was modified 1 year, 7 months ago by markluprin.
    • This reply was modified 1 year, 7 months ago by markluprin.
    Plugin Author Marco van Wieren

    (@wpo365)

    Hi @markluprin

    This exact error message can be returned when you either selected “Users must be signed in with Microsoft” or when you calling the API to get a token for the current user (which would only be available for users that sign in with Microsoft).

    Maybe the response of the API is cached by your server and you must purge / refresh this?

    Please also share with me, what you are trying to embed, so that I can better support you.

    Thanks!

    -Marco

    Thread Starter markluprin

    (@markluprin)

    Good afternoon, I want to put Power Bi. I set up a security group, created an application and registered all the data from it, added a security group to Power Bi, and also granted all the necessary rights.

    I tried to connect via PHP directly, via cURL, the same thing, it gives a 301 error.

    Could this problem be due to the fact that the account is not a PRO version?

    Plugin Author Marco van Wieren

    (@wpo365)

    Hi @markluprin

    In that case, you are indeed requesting a token from the API and the free version of the plugin only supports – when embedding Power BI content – the User owns data scenario. This means that the user must have at least a Power BI (PRO) license and therefore the user must sign in with Microsoft (or else a token with delegated privileges to request data from the Power BI API endpoints cannot be retrieved).

    The premium paid extension WPO365 | MICROSOFT 365 APPS would unlock support for the Application own data scenario. This in turn, however, requires you to purchase so-called Capacity from Microsoft.

    Hope this helps!

    -Marco

    Plugin Author Marco van Wieren

    (@wpo365)

    Hi @markluprin

    I am closing this topic because I haven’t heard back from you.

    Thanks!

    -Marco

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Request authentication error’ is closed to new replies.