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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
R3NNIE
New Member

Power BI A.P.I Authentication- Front End Application

I am currently trying to make a call to the power b.i a.p.i so that I can use it for my application and understand how to make api calls to microsoft api's. I have not been able to get a response from the api. I get an unauthorized error, that no access control allow origin header is present on the requested resource. I come from a front-end background where I am used to making API calls using javascript and angular.js. I am not familiar with the microsoft API and how it must be authorized. I have tried to read articles but they go over my head. 

The errors are as follows- 

 Failed to load resource: the server responded with a status of 404 (Not Found)
 
XMLHttpRequest: cannot load https://api.powerbi.com/v1.0/myorg/dashboards. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://renniesb.github.io' is therefore not allowed access. The response had HTTP status code 404.
expected behavior- Show power bi dashboards in the console to test the communication between the app and the power bi A.P.I
 

Test sitehttps://Renniesb.github.io/sample_dashboard. To test I authorize with my credentials. How would I let users of this forum test the behavior. How do I enable their credentials?

 

List of things I've tried already- 
2 REPLIES 2
eligr
Power BI Team
Power BI Team

Hi.

 

Here are some samples for embedding:

https://github.com/Microsoft/PowerBI-Developer-Samples

 

Here are some getting started notes:

https://docs.microsoft.com/en-us/power-bi/developer/embedding

 

Eli.

Anonymous
Not applicable

Hi @R3NNIE!

Have you find any solution to the problem?
I'm in the same situation with the same error.

Thanks!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.