Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I'm trying to connect to a REST API with PBI's power query, but for some reason I get the following message:
The login information is 100% correct, and I have made the same API calls with Postman and they work without any problems. I have tried editing the data source settings and everything else that I can find, but I haven't been able to solve this.
I have the API calls made in advanced editor, and I can see the actual data that is coming through in the preview, but when I click "Close & Apply" I get this error.
Any help is greatly appreciated 🙂
Hi @Anonymous - not sure if you ever figured this out, but I stumbled upon your post when I was facing the same issue today. What I noticed was that anytime I would make a change to my table, my header & token were being dropped. After I made my changes, I went into Advanced Editor and re-added my header & token and everything worked again. Hope this helps!
Thanks for the reply @Poojara_D12 !
I tried those things, but I was unable to advance. I have tried other things as well, but without any success.
So, I am trying to do a POST command to get a bearer token, but then I get the error seen in my first post. However, I am able to do GET commands through using a bearer token which I got from Postman. Those GET commands get me data from the API and I can make visuals from them etc, so the problem has to do something with the POST command and PBI. The function to make the POST call is from a official template published by the developers of the software which API I am trying to connect, so there shouldn't be any problems.
Do you or others have any ideas that I could try? Thanks in advance!
Hi @Anonymous
Did Poojara_D12 reply positively solve your problem, if yes, then you can mark his reply as a solution. If you have any other questions, you can go ahead and ask them below.
Best regards,
Albert He
Hi @Anonymous
Thank you for the screenshot and detailed explanation! It sounds like the issue might be related to Power BI's authentication configuration for the API, rather than the API or credentials themselves.
Here are some steps you can try to troubleshoot and potentially resolve the issue:
Check Authentication Method:
Make sure you're selecting the correct authentication method in Power BI. If your API requires an API key or a bearer token, use the "Web API" option instead of "Anonymous" or "Basic." You may need to enter the token or key in this section.
Check Data Privacy Settings:
Sometimes, Power BI’s data privacy settings can interfere with API calls. To adjust this:
Edit Permissions:
If you've tried multiple authentication methods without success, Power BI might be using cached permissions. To reset them:
Check API Rate Limits and Restrictions:
If you’re previewing data but get an error on applying changes, it could be due to API rate limits or specific query parameters that Power BI’s connection doesn’t handle well. Check the API documentation to see if there are any known limitations or additional headers required.
Testing in Advanced Editor:
Sometimes Power BI will show previews but fail to authenticate on apply if there’s a complex query structure. Review your code in the Advanced Editor and try breaking it down to simpler steps if possible.
Use Headers for Authentication:
If the API requires headers like Authorization (e.g., Bearer <token>), you may need to manually add those in the query steps. This is especially useful if the "Web API" method doesn’t work.
Use a Custom Connector:
If nothing else works, you may need a Power BI custom connector to handle specific authentication methods or complex API requirements. Microsoft has resources on developing custom connectors, though this approach requires some coding.
Try these steps and let me know if any of them resolve the issue!
Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂
Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
13 | |
13 | |
11 | |
8 | |
8 |
User | Count |
---|---|
17 | |
10 | |
7 | |
7 | |
7 |