Forum Discussion
PLEASE HELP ME! Virtual Data Gateways help
This is a known pain point with Web.Contents + RelativePath data sources when moving from Desktop to the Service/Gateway. A couple of things worth checking:
1. Exact URL match: the "data source" that Power BI registers for credential mapping is exactly the first argument you pass to Web.Contents, i.e. "https://peelhunt.s3.amazonaws.com" - no trailing slash, no path. Whatever you enter in the gateway's "New connection" URL field for that data source has to match this character-for-character (protocol, case, trailing slash). Even one extra "/" will cause the credential you create not to bind to the source your query actually uses, which shows up as this kind of generic "Invalid connection credentials" failure.
2. Anonymous + S3 bucket root: since https://peelhunt.s3.amazonaws.com on its own (no object key) typically returns a 403 AccessDenied from S3, some versions of the connection-test dialog treat that non-2xx response as a credential failure even with "Skip Test Connection" ticked - this checkbox isn't consistently honored for Web/Anonymous sources in every entry point of the UI.
Workaround that tends to work: instead of adding/editing this data source credential from the inline prompt on the dataset's "Data source credentials" settings page, go to Manage gateways (admin portal) > your VNet/On-prem gateway > Data source connections, and add the Web data source directly there with Authentication = Anonymous and Skip Test Connection checked. That admin-side flow tends to actually respect the skip flag for Web sources, whereas the dataset-settings "New connection" tile forces a live test regardless.
If it still fails at that point, it's worth confirming the Privacy Level set for this source is consistent (e.g. Public/None for all four sources in the dataset) - a privacy level mismatch across sources in the same dataset also surfaces as a generic "Unable to create connection" error at publish/refresh time.