Hi
Thank you for your prompt response.
I'm actually using Source = Json.Document(Web.Contents(...)). I took you advice and placed the basic authentication header into Web.Contents and set Authentication type as anonymous so the basic authentication in the Web.Contents would be used.
Source = Json.Document(Web.Contents("https://api.url.com/",[Headers=[#"Authorization"="Basic ZZZZZZZZZ", #"Accept-Encoding"="gzip"]]))
Once again everything works in Power BI Desktop but when we upload it to Power BI (Web) and try and set up a refresh we recieve the below error.
Data source type:
Data source error: The 'Authorization' header is only supported when connecting anonymously. These headers can be used with all authentication types: Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, If-Modified-Since, Prefer, Referer
Cluster URI: WABI-AUSTRALIA-SOUTHEAST-redirect.analysis.windows.net
Activity ID: 9515d921-45ea-4cc7-b2db-cfb35b71ba14
Request ID: 161b99b8-32b5-da4f-df49-2c505f9ec77a
Time: 2016-05-01 02:19:26Z
I did try to setup the Authentication method in Power BI (Web) as anonymous but receieved the below error.
Activity ID: 9515d921-45ea-4cc7-b2db-cfb35b71ba14
Request ID: ef8f1d3c-4d9b-b6d0-470b-ad7c240eb7b8
Status code: 400
Time: Sun May 01 2016 13:14:54 GMT+1000 (AUS Eastern Standard Time)
Version: 13.0.1100.472
Cluster URI: https://wabi-australia-southeast-redirect.analysis.windows.net
Details: The credentials provided for the Web source are invalid.
I did see that you mentioned Web.Page in you previous message but I did not think it was applicable to this example.Please let me know if I was incorrect.
Thank you in advance for your assistance.