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:
[sourcecode language=”text” padlinenumbers=”true” highlight=”4″]
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:
[sourcecode language=”text” highlight=”4″]
So that the CredentialQuery option is used instead of the Query option, the search term will not appear in the log file.