The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
Solved! Go to Solution.
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.
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.
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.
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.
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.