Forum Discussion
Issue with pulling REST API data with JWT(Json Web Token) to Power BI
- 1 year ago
Hi sameer260 ,
Thanks for reaching out to the Microsoft fabric community forum.Since Basic authentication works, it’s possible that the USU License Management API restricts JWT-based requests from Power BI due to its user-agent or IP. Contact the vendor to confirm if Power BI Desktop is allowed to access their API using JWT.
Confirm with USU support if JWT access from Power BI Desktop is permitted or blocked at their end.
Verify that the JWT is correctly formatted and not expired when testing in Power BI. You mentioned it works in Insomnia, so compare the exact header setup between Insomnia and Power BI.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Community Support Team
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:
-
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.
-
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.
Hello, Thank you for the reply. I just missed to inform that this issue is occuring if I try to pull data using JWT but when I tried with Basic authentication it is working fine.
- v-menakakota1 year agoCommunity Support
Hi sameer260 ,
Thanks for reaching out to the Microsoft fabric community forum.Since Basic authentication works, it’s possible that the USU License Management API restricts JWT-based requests from Power BI due to its user-agent or IP. Contact the vendor to confirm if Power BI Desktop is allowed to access their API using JWT.
Confirm with USU support if JWT access from Power BI Desktop is permitted or blocked at their end.
Verify that the JWT is correctly formatted and not expired when testing in Power BI. You mentioned it works in Insomnia, so compare the exact header setup between Insomnia and Power BI.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Community Support Team- v-menakakota1 year agoCommunity Support
Hi sameer260 ,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you.
Thank you.
- v-menakakota1 year agoCommunity Support
Hi sameer260 ,
Can you please confirm whether the issue has been resolved. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.
Thank you.