Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
timowille
New Member

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 :

1.PNG

 

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"'.

2.PNG

 

 

 

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 23

Hi,

    I had try by return below message, and Power BI do pop up and ask for O365 login, but after success login, when go to connect it still say no permission. Any suggestion?

 

Thank you very much.

 


@v-qiuyu-msft wrote:

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


 

Does this mean there is no way to consume AAD authenticated Azure Functions from Power Bi?   REALLY????

 

 

Hi,

  I also having same issue for Power BI connect to OData in azure app. Is there any new solution that we can use?

 

I had try to return below message and Power BI do pop up O365 screen for login, but after login, it still say no permission.

 

WWW-Authenticate: Bearer authorization_uri="https://login.windows.net/a1a2578a-8fd3-4595-bb18-7d17df8944b0/oauth2/authorize"

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.