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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
EBWorkingItOut
Frequent Visitor

Authorization Header unsupported but using Anonymous Credentials PowerBI API

Hi Everyone,

 

So I'm pretty new to using API's and that side of Power but have been working through a workspace monitoring solution through calling the Power BI RestAPI. Having managed to set up a refreshable access token I thought I was getting there but I'm throwing an error that I can't seem to resolve.

 

Using the query below which previously worked, ((last week)), when using the actual Bearer Token,  now returns the following error message, for either method.

 

Expression.Error: The 'Authorization' header is only supported when connecting anonymously. These headers can be used with all authentication types: Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, Content-Type, If-Modified-Since, Prefer, Range, Referer

 

Power Query

let
Source = Json.Document(Web.Contents("https://api.powerbi.com/v1.0/myorg/",
[
RelativePath = "admin/groups?$top=5000&$expand=datasets,dataflows,reports,dashboards,users",
Headers=[Authorization="Bearer " & #"Get Access Token"()]
])),
value = Source[value],
#"Converted to Table" = Table.FromList(value, Splitter.SplitByNothing(), null, null, ExtraValues.Error)......

 

I've cleared the credentials and reset Credentials to Anonymous and Privacy Level of none several time but don't seem to be getting anywhere.  Can anyone point me in the right direction.

 

Many Thanks

 

Em

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @EBWorkingItOut ,

 

As far as I know, this error you were seeing was not from PowerBI but from the API you were trying to connect to.  Somehow your datasource may stop trying to login "Anonymous" and had got set to "Basic".  You can reset the type by steps as below.

File>Options and settings>Data source settings

Then edit the permission to reset the type. The credential type should look like as below.

vrzhoumsft_0-1683789681078.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

2 REPLIES 2
vindhyaranpise
New Member

I'm currently facing same issue. I have checked my data source settings and it is set to anonymous and none. but it's still shows error as below: 
Expression.Error: The 'Authorization' header is only supported when connecting anonymously. These headers can be used with all authentication types: Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, Content-Type, If-Modified-Since, Prefer, Range, Referer

I have also tried creating new query but still getting same error. 

 

 

Anonymous
Not applicable

Hi @EBWorkingItOut ,

 

As far as I know, this error you were seeing was not from PowerBI but from the API you were trying to connect to.  Somehow your datasource may stop trying to login "Anonymous" and had got set to "Basic".  You can reset the type by steps as below.

File>Options and settings>Data source settings

Then edit the permission to reset the type. The credential type should look like as below.

vrzhoumsft_0-1683789681078.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors