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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ValentinLenkSBS
Frequent Visitor

Bypass manual credential definition for dynamic root URL in Web Sources

I'm trying to access various different servers, the exact names of which are loaded from a different source. The respective URLs of these sources look something like {servername}.{domain}/{relativepath} where domain and relativepath are fixed, but servername is not.

 

A minimal example using Wikipedia for different countries would look like this:

 

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSklVitWJVkrNA1N5+XlAfiwA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Ctry = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Ctry", type text}}),
    #"Added URL" = Table.AddColumn(#"Changed Type", "URL", each [Ctry] & ".wikipedia.org", type text),
    #"Added Reachable" = Table.AddColumn(#"Added URL", "Reachable", each not (try Web.Contents([URL]))[HasError], type logical)
in
    #"Added Reachable"

 

 

The issue in my actual working set is that I am then prompted to manually set anonymous credentials for every single URL.

Is there a way to bypass that? To define the credentials (or lack thereof) in the query itself, maybe?

 

I realise this may be the wrong tool for the job, but my options are limited so I'm trying the best with what I have.

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

I realise this may be the wrong tool for the job

Very much so. This will barely work on the Desktop (if you can find at least some sort of common URL) but will fail miserably to refresh on the service.

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

I realise this may be the wrong tool for the job

Very much so. This will barely work on the Desktop (if you can find at least some sort of common URL) but will fail miserably to refresh on the service.

Thanks for the confirmation.

 

The user in question hoped to show this data side by side with other data. I will inform them that they will need a different tool to fetch that data and provide me with a single data source, citing you to back up my claim.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

Top Solution Authors
Top Kudoed Authors