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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
esqkz
Regular Visitor

REST API connection to ERM using token

Hello, please suggest any variants where have I made a mistake...
I have some ERM database in xml. Some tables are aailable without identification (local network).
Others - need Bearer token
I'm connecting from Power Query to "open" tables:
= Xml.Tables(Web.Contents("http://192..../GetShippedPaidReport2?beg_date=2024-04-01&end_date=2024-05-15"))

And have needed data.

But when I try to use token, I have a problem:

=Xml.Tables(Web.Contents("http://195..../GetWarehouses", [Headers = [Authorisation = "Bearer ey...DMmwfI"]]))

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

When I try to change the Data Source Settings to Anonymous it still doesn't work. 

I'm not an IT person, and the IT dept can't help. It seems the request is correct. But obviously I'm doing everything wrong. 
Please give some advice.

1 REPLY 1
Anonymous
Not applicable

Hi @esqkz 

You need to set the authentication to Anonymous, you can refer to the following link.

Solved: Web.Contents with the Content option is only suppo... - Microsoft Fabric Community

Solved: The 'Authorization' header is only supported when ... - Microsoft Fabric Community

 

Best Regards!

Yolo Zhu

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

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors