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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
wes-shen
Frequent Visitor

How to schedule refresh API source with Authorization header

Hi there,

 

On Power BI desktop, I successfully connected to a API web source with "Authorization" as header and a bearer token.

In the data source settings, the type is set to Anonymous

 

I've published the report successfully onto Power BI Service.

 

However, I encountered a (400) Bad Request error when I tried to authenticate the data source, which I believe I need to do in order to schedule a data source refresh.

 

 

Any ideas how I can resolve this?

 

Thanks

Wes

 

3 REPLIES 3
Anonymous
Not applicable

Hi @wes-shen ,

400 error can be like malformed request syntax, invalid request parameters, or deceptive request routing etc.

 

Does you use Power BI Rest APIs to set schedule refresh? If so, you may have set your parameters incorrectly. Refer to the example code posted  here  and these documentation: 

Embed Token 

Datasets - Refresh Dataset In Group

How to refresh Power BI dataset with REST API using SSIS 

 

I have also found a similar post, please refer to it to see if it helps you.

Solved: (400) Bad Request using Web.Contents to connect to... - Microsoft Power BI Community

  • following the instructions in this blog to connect to your data source.
  • If you still get error, you can use Fiddler to track the process following the guide in this video.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

@wes-shen Did you click the Edit credentials link?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler , yes i did. And the last screenshot in my post was what happened after i clicked on the Edit Credentials and tried to authenticate.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.