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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Web.Contents data source settings code

I can not find how to use Web.Contents and pass in the data source security settings.

I have 40 websites I am trying to query, and every one is asking me to edit the credentials via the GUI.

 

How do I pass in the security credentials for Anonymous auth into the Web.Contents query?

7 REPLIES 7
mahoneypat
Microsoft Employee
Microsoft Employee

You could start with a table with 3 columns - URL, username and password and pass those values in a web call for each row (assuming they return data with the same columns).  If you put that in a dataflow or published dataset, your consumers could get the data w/o seeing all the credentials.  Not sure I fully understand your scenario, but that is another approach to consider.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


mahoneypat
Microsoft Employee
Microsoft Employee

This documentation show how to package credentials into a record to be sent in your web calls.  

Handling authentication for Power Query connectors | Microsoft Docs

 

Also, if users are getting prompted for credentials, you may want to consider settings up Dataflows to hold your data for your users to build reports againsts.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

I followed all of those suggestions in the connectors help document. 

Sadly Power BI handles "credentials" and "authenication" in totally different ways. So you can set your Authentication, but are still required to set the credentialing method via the GUI.

 

If you do a web.contents("google.com", XYZ), no matter what you put for the XYZ you are still asked for credentials via the GUI.

 

And the dataflows still wouldnt work, because then *I* would have to click the GUI credentails 50-100 times a day when the new list of urls is published... 😜

 

It just seems like either there is something super easy I am missing, or it is impossible.

 

EDIT: by the way... when I was learning Power BI, you are the only person who, when I saw your name in the post, would be like "ok, time for the real dope answer!"

Thanks for how much you contribue to the community!

Jimmy801
Community Champion
Community Champion

Hello @Anonymous 

 

I think there is no way to hardcode this in Desktop. Credentials data source settings are stored in local profile.

 

Jimmy

Anonymous
Not applicable

oh no!!!!

How do people do it when they have to scrape 50/100 websites? do they just manually keep clicking the button?

 

Do you know how to submit a feature request? I cant find it anywhere...

Hi @Anonymous ,

Considering safety issues, vertificate the credentials via GUI is inevitable even if the credentials is Anonymous. As @ Jimmy801 mentioned, data source credentials are encrypted and stored in local profile.

 

If you really want to sumbit a feature request, you can create a new idea here to sumbit it.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Anonymous
Not applicable

Anyone have any idea? Still at a complete loss.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors