Forum Discussion
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
- AnonymousNot 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.- AnonymousNot 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.
- MaryFAdvocate 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:
- Go to SharePoint and create a site, I called mine My Forms
- Go back to Forms scroll to the bottom of the page, click on All My Forms on right hand side
- On the form you need you notice an ellipsis (…) at bottom right, click on move to Group
- You should see your recently created site, select it and the form will move to that area
- 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
- From Excel online, go to File | Info | Open in Desktop App - this will download a copy.
- From the copy go to File | Info | Copy Path E.g., https://mysharepoint.sharepoint.com/sites/MyForms/Shared%20Documents/NameOfForm.xlsx?web=1
- 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
- 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.
- Fz8J1mNew Member
Have you found the answer to this issue? My team and I are struggling with the same issue.
- AnonymousNot applicable
I am having the same issue. The connection was working perfectly on the 5th and now I am getting an error.
- v-qiuyu-msftCommunity 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- timowilleNew 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
- v-qiuyu-msftCommunity Support
Hi timowille,
The workaround provided by the PG is:
To make this work with Power BI, the endpoint needs to return an URL which looks like
WWW-Authenticate: Bearer authorization_uri="https://login.windows.net/a1a2578a-8fd3-4595-bb18-7d17df8944b0/oauth2/authorize"
Where the GUID is the AAD tenant ID. This cannot be done entirely via configuration, it involves writing code on the service side.
Best Regards,
Qiuyun Yu
- RichieRichAdvocate III
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.