Forum Discussion

timowille's avatar
timowille
New Member
9 years ago

Web Content - Access Method - WWW-Authenticate header doesn't contain a valid authorization URI

Hi,

 

i'm trying to connect to a custom REST service hosted on an azure app service that is configured to authenticate against Azure Active Directory. The authentication is working fine, when i open the apis url from a browser.

When trying to connect via Power BI :

 

I get the following message when i try to authenticate using an organizational account: The WWW-Authenticate header doesn't contain a valid authorization URI. Header value: 'Bearer realm="XYZ.azurewebsites.net"'.

 

 

 

Has anyone managed to authenticate against Azure AD using Power BI for querying data from a Web Api?

Any idea what i'm doing wrong?

 

Cheers!

 

Timo

23 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    There is something changed since 5th April, the API data sources are complaining with same error message-WWW-Authenticate header doesn't contain a valid authorization URI.
    Is there a solution to fix this error. It shows up when you go for Organizational Authentication.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Found a work around for this, which would be hepful and would transition from APIs to Sharepoint-

       

      1. Add the Microsoft form to the "Form Group Name" Forms Group.
      This can be done by opening the forms home page, scroll to bottom and click on "All My Forms". On the next page, click on ellipses and choose "Move".( We'll first try to copy the form and responses, and will then see how it goes.)

      2. After the form is moved, Open the form again from "All My Forms" Page, and then Open responses in excel, Go to File Menu -> Info-> Copy Path.

      3. Change the source in the pbix to the new SharePoint web link.

      • MaryF's avatar
        MaryF
        Advocate II

        Many thanks Pranay, that worked for me.

        For others, I've created a  more detailed Step-bystep guide. Note this is for connecting to Forms and assumes you have SharePoint online:

        1. Go to SharePoint and create a site, I called mine My Forms
        2. Go back to Forms scroll to the bottom of the page, click on All My Forms on right hand side
        3. On the form you need you notice an ellipsis (…) at bottom right, click on move to Group
        4. You should see your recently created site, select it and the form will move to that area
        5. Go back to your Forms landing page and you'll see your form, now when you click on it & go to responses choose Open in Excel
        6. From Excel online, go to File | Info | Open in Desktop App - this will download a copy.
        7. From the copy go to File | Info | Copy Path E.g., https://mysharepoint.sharepoint.com/sites/MyForms/Shared%20Documents/NameOfForm.xlsx?web=1
        8. Now in Power BI create a new query, this time from Web and paste in the content from your clipboard | IMPORTANT Remove the ?web=1 part
        9. You may need to sign in again, but this time you should see the content of your form, which will go on to include any new responses.
    • Fz8J1m's avatar
      Fz8J1m
      New Member

      Have you found the answer to this issue? My team and I are struggling with the same issue.

    • Anonymous's avatar
      Anonymous
      Not applicable

      I am having the same issue. The connection was working perfectly on the 5th and now I am getting an error. 

  • v-qiuyu-msft's avatar
    v-qiuyu-msft
    Community Support

    Hi timowille,

     

    I found the same issue reported before, and the PG said:

     

    "The Azure App part is currently unsupported due to a limitation with Azure Active Directory."

     

    Best Regards,
    Qiuyun Yu

    • timowille's avatar
      timowille
      New Member

      Hi Qiuyun Yu,

       

      is there any information on when this will work or is there a workaround? We would like to offer a REST API to make on-prem data available to Organizational Accounts in Power BI. Data Gateway is no option.

       

      Thanks for your support!

       

      Timo

  • I was experiencing this problem when I had a mix of SharePoint on premises and SharePoint Online. This error came up for the SharePoint on-Prem and I just used "Windows" Authentication instead of the "Microsoft Account". I had ass-u-me-d that they would both use the same authentication method, when they do not.