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
sameer260
Frequent Visitor

Issue with pulling REST API data with JWT(Json Web Token) to Power BI

Good Afternoon Everyone! I am trying to pull the data from a SaaS Application named USU License Management using REST API with JWT(Json Web Token). I am able to generate the JWT and test pulling the data in Insomnia but I am unable to pull in Power BI desktop. 

 

Kindly let me understand if anyone faced the issue similar to this and let me know the solution. I also want to understand if that could be some permission issue from the vendor i.e. USU License Management. Below is the error I am facing while pulling the data. As per the error detail I have tried changing the header names as well.

 

Details: "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"

2 REPLIES 2
rohit1991
Super User
Super User

Hi @sameer260 ,

 

I’ve run into this before, and Power BI can be tricky with APIs that require JWT or Bearer token authentication. Here’s what usually works:

  1. Set the authentication to “Anonymous” when setting up your Web connection in Power Query. Power BI blocks Authorization headers if you pick any other option.

     

  2. If you still get the “Authorization header only supported when connecting anonymously” error: Make sure your JWT is valid (not expired). Double-check with your API vendor if Power BI Desktop is allowed to access the API. Some SaaS providers block requests from tools like Power BI for security reasons. Sometimes, even after setting Anonymous, the API may restrict Power BI traffic. In that case, a common workaround is to use a small Python script, Azure Function, or Power Automate to pull the data and drop it into a location Power BI can reach (like Azure Blob, SharePoint, or SQL). Then just connect Power BI to that.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
lbendlin
Super User
Super User

You specify the Bearer token as part of the header.

 

API Authentication in Power Query

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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