There’s a new, as yet undocumented, option for the Web.Contents() M function that is only available for custom data connectors and not in Power BI Desktop: CredentialQueryOption. It does the same thing as the Query option, but it stops the values you are passing to the query parameter from being logged in Power BI’s diagnostic logs, so it’s useful if you are passing sensitive information such as passwords.
For example, consider the following call to Web.Contents() used in a custom data connector:
Web.Contents( "https://data.gov.uk/api", [RelativePath="3/action/package_search", Query=[q="cows"] ] )
When the custom data connector is used in Power BI Desktop, if diagnostic logging is turned on in the Options dialog:
…then, if you look in the log files you’ll see the entire url called including the search term “cows”:
However, if you change the M code to:
Web.Contents( "https://data.gov.uk/api", [RelativePath="3/action/package_search", CredentialQuery=[q="cows"] ] )
So that the CredentialQuery option is used instead of the Query option, the search term will not appear in the log file.