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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors