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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Ibu
Frequent Visitor

Service claims invalid credentials for IP-based Web data source

I created an M query to pull data from an anonymous API hosted by an IoT device at its public IP address. It works well in Power BI Desktop but fails to refresh once uploaded to the Service workspace. It requests that I set credentials for the data source, but appears to fail to sign in once I do.

 

This is the M query. Notice it is a static data source (by use of a static uri as the first argument to Web.Contents), and so it should be refreshable in the service.

let
    Username = "MyUsername",
    Host = "http://123.123.123.123:8080/",
    WebResponse = Web.Contents(Host, [RelativePath="some/path/to/a/public/api", Query=[ username = Username ]]),
    ResponseXml = Xml.Tables(WebResponse),
    #"Changed Type" = Table.TransformColumnTypes(ResponseXml,{{"sessionID", type text}, {"challenge", type text}, {"iterations", Int64.Type}, {"isIrreversible", type logical}, {"salt", type text}, {"sessionIDVersion", Int64.Type}, {"Attribute:version", Int64.Type}})
in
    #"Changed Type"

 

In the service, this is where it claims the data source requires credentials:

Ibu_0-1673901976757.png

 

After confirming the API/data source is anonymous in the corresponding dialog, I press "Sign in" and the loading indicator never goes away:

Ibu_1-1673902186403.png

 

I tried setting up another Web data source pointing to cnn.com, which worked fine. I also tried setting the privacy level to various values, to no avail.

 

Is an IP-based web data source not supported? 

1 ACCEPTED SOLUTION
GilbertQ
Super User
Super User

Hi @Ibu 

 

I think this is because it is running on port 8080

If you need to use that port I would create a connecting with the On-Premise Gateway to get it working successfully.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

2 REPLIES 2
GilbertQ
Super User
Super User

Hi @Ibu 

 

I think this is because it is running on port 8080

If you need to use that port I would create a connecting with the On-Premise Gateway to get it working successfully.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Ibu
Frequent Visitor

Gotcha. I was hoping to implement my simple script in a way that doesn't require an on-premises gateway, but it looks like that won't be possible.

Thanks!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors