Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello All,
I have a dillemma id like some asisstance with. I have the age old Web.Contents scheduled refresh issue when i build reports from a specific source (I pretty much only work with htis source.
I have the below M Code for the data
let
Source = Csv.Document(Web.Contents("Put Helm CONNECT CSV Connection String Here", [ApiKeyName= "apikey"]),[Delimiter=",", Encoding=65001, QuoteStyle=QuoteStyle.Csv]),#"Promoted Headers" = Table.PromoteHeaders(Source)
in
#"Promoted Headers"
But witht he above I subsequantly cannot refresh this on the service and the onlyw ay i could figure to make this work is via the below by addine api within the query
let
ApiKey = "your_api_key_here",
Url = "CSV String here&apikey=" & ApiKey, //keep the &apikey=
Source = Csv.Document(Web.Contents(Url), [Delimiter=",", Encoding=65001, QuoteStyle=QuoteStyle.Csv]),
#"Promoted Headers" = Table.PromoteHeaders(Source)
in
#"Promoted Headers"
But this obviousis not the most secure way pass the API key this way.
Does anyone have any better solutions i could try to be more secure witht he API key as Im not always the one witht he key so the ideal situation would be to prompt thd user to place the key in when they get the file to upload to there own service and it then allows scheduled refresh
I have done some research on the topic and mosta referencing the jscontents and some arent working for (inc the Skip test connection)
Hi @NathanV8
What error did you meet when using the first method with the parameter ApiKeyName in Web.Contents? According to the official document, this method seems to work. Web.Contents - PowerQuery M | Microsoft Learn
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 4 |