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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Cadker
Frequent Visitor

Treat root domain as same datasource?

Hello,

I am doing a Web query on an API to get a list of servers as seen in the query below. I created a custom function that directly goes to each server and runs a query and it works except it sees each server as a unique source and forces me to enter in my credentials for each one and there are upwards of 50 in the list. The credentials are the same across all the servers. 
Server  Query

let
Source = Json.Document(Web.Contents("https://myInstance.us.domain.cloud/api/configuration/v1/servers")),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"name", "status", "address", "port", "timezone", "version"}, {"name", "status", "address", "port", "timezone", "version"}),
#"Removed Other Columns" = Table.SelectColumns(#"Expanded Column1",{"address"}),
#"Invoked Custom Function" = Table.AddColumn(#"Removed Other Columns", "urlQuery", each urlQuery([address]))
in
#"Invoked Custom Function"

Output from above:

address
myInstance-server-1.us.domain.cloud
myInstance-server-10.us.domain.cloud
myInstance-server-11.us.domain.cloud
myInstance-server-12.us.domain.cloud
myInstance-server-13.us.domain.cloud
myInstance-server-14.us.domain.cloud
myInstance-server-15.us.domain.cloud
myInstance-server-16.us.domain.cloud
myInstance-server-17.us.domain.cloud
myInstance-server-18.us.domain.cloud
myInstance-server-19.us.domain.cloud
myInstance-server-2.us.domain.cloud



 Custom Function

(serverURL as text) =>
let
Source = Xml.Tables(Web.Contents("https://"& serverURL & "/2/query?platform=windows&query=(select%20(device_uid%20name%20last_seen%20first_seen)%20(from%20device))&hr=true&format=xml")),
Table1 = Source{1}[Table],
Table0 = Table1{0}[Table],
#"Changed Type" = Table.TransformColumnTypes(Table0,{{"c0", type text}, {"c1", type text}, {"c2", type text}, {"c3", type text}})
in
#"Changed Type" 

 

Everything is under *.us.domain.cloud . Is there a way I can do it and have it treat it as one and only require credentials once?

 

2 REPLIES 2
smpa01
Community Champion
Community Champion

@Cadker  not sure it would work but can you please untick the following and try

Capture.PNG

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Cadker
Frequent Visitor

No luck. For now I just hardcoded the Authorization header into it so I dont have to enter my credentials 50+ times

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.