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

Join 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.

Reply
Anonymous
Not applicable

Remote API Access to data source sudden errors

I have built a report that pulls some data directly from a REST API.  This API requires authentication, and the following code worked for me to access and pull the data directly into PowerBI:

 

let
 Source = 
    Json.Document(Web.Contents("https://somesite.com/Web/", 
    [Headers=[
        AccountLoginName="user", 
        AccountPassword="pass", 
        SourceSystemID="123", 
        DomainID="1"],
RelativePath="path/to/api/endpoint"

However, I loaded the report today to make some modifications, and the following error was presented to me: 

 

Expression.Error: The 'AccountLoginName' header is only supported when connecting anonymously. These headers can be used with all authentication types: Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, Content-Type, If-Modified-Since, Prefer, Referer

 

Can anyone give me a nudge in the right direction? 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Got it sorted.  Realized that the error I was seeing was not from PowerBI but from the API I was trying to connect to.  Somehow my datasource stopped trying to login "Anonymous" and had got set to "Basic"  A quick reset, and we are good.

 

image.png

This pointed me in the right direction.

https://community.powerbi.com/t5/Service/Anonymous-access/m-p/277217/highlight/true#M33295

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Got it sorted.  Realized that the error I was seeing was not from PowerBI but from the API I was trying to connect to.  Somehow my datasource stopped trying to login "Anonymous" and had got set to "Basic"  A quick reset, and we are good.

 

image.png

This pointed me in the right direction.

https://community.powerbi.com/t5/Service/Anonymous-access/m-p/277217/highlight/true#M33295

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.