Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello!
I am struggling to get Basic authentication working with a REST API.
I keep getting the very generic error "We couldn't authenticate with the credentials provided." I have verified multiple times that the credentials are correct, and they also work when I use the URL in a browser.
There's nothing unusual about this API, it's a standard REST API with JSON output.
I opened up Fiddler and watched the process when I try to submit the credentials. The authorization header does appear and is correct. The initial response is an HTTP 307 so Power BI is following this redirect, but in the subsequent call the Authorization header is dropped resulting in a 401 which is why I believe I'm getting the error message.
Any thoughts on how to get past this or troubleshoot to see if something else might be causing the authentication failure? Or is there a way to get Power BI to maintain the Authorization header through the redirect?
Thanks!
Follow up:
I can reproduce the issue in Postman by turning off "Automatically follow redirects".
Seems to me that Power BI is not following 3xx status codes.
I found this thread: https://community.powerbi.com/t5/Power-Query/oAuth-and-Power-Query/td-p/361353 but there's no solution.
Any ideas?
Thanks!
Thanks for the replies! Unfortunately, none of the links provided covered the symptoms I am experiencing. They are more generic "how to authenticate" threads which is not quite the issue I am experiencing.
Hi @bbdiitmanager ,
Maybe you can clear the permissions in 'Data source and settings' in power bi desktop and try it again.
Also, you can refer these article and issue that hopes to help you too:
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
@bbdiitmanager , Test if this can help
https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-troubleshoot
https://docs.microsoft.com/en-us/power-bi/developer/automation/walkthrough-push-data-get-token
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |