Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

API Authentication Issue



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?



Community Support
Community Support

Re: API Authentication Issue

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:

  1. Easiest way of connecting Power BI to a REST API with Oath2 authentication 
  2. 401 Unauthorized Error: What It Is and How to Fix It 
  3. HTTP 401 Unauthorized by using PowerBi rest api 


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.

Regular Visitor

Re: API Authentication Issue

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.

Regular Visitor

Re: API Authentication Issue

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: but there's no solution.


Any ideas?



Helpful resources

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors