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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
RohitClouds
New Member

"Error in DataSource: Web.Contents Content Option Not Supported for Anonymous Connections"

I am connecting to api using username and password. but I am getting the authentication issue which is  "Web.Contents with the Content option is only supported when connecting anonymously." My issue screenshot are mentioned below.

RohitClouds_0-1690814305275.png


My code are:

---------------------------------------------------

let
url = "https://xxxxxxxxxxxxx.io/api/v1/order_view",
body = "{""order_id"":""11931""}",

Source = Json.Document(Web.Contents(url,[Content=Text.ToBinary(body),Headers=[#"Content-Type"="application/json"]])),
#"Converted to Table" = Record.ToTable(Source),
Value = #"Converted to Table"{3}[Value]
in
Value




3 REPLIES 3
DataVitalizer
Super User
Super User

Hi @RohitClouds 

  1. Go to File/Options and Settings/Data source settings
  2. Select your datasource and click Edit Permissions then Edit Credentials
  3. Select Anonymous and try again 

Did it work ?  👍 ‌‌A kudos would be appreciated 📢 Mark it as a solution to help spreading knowledge

Thank you for your reply othy_bi. I am calling an API and we have api credentials for that I am not able to call anonymously.

Do you have any other ideas?

Change your source row as below and try again

Source = Json.Document(Web.Contents(url,[          
     Headers = [#"Content-Type"="application/json"],
     Content = Text.ToBinary(body) 
    ])),

Did it work ?  ‌‌👍 A kudos would be appreciated 📢 Mark it as a solution to help spreading knowledge

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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.

Top Solution Authors