Hi v-qiuyu-msft
I am using Json.Documnt(web.content()) and this api is hosted in cloud. Gateway is showing as "Connect Directly" but in the connection it is giving me the invalid credentials. To give more context, my api is under API management which is always expecting the subscription details for authorization. When i access the api from power bi desktop i was able to provide the http header value , but when i publish the report to powerbi.com then eader values are not available and in the data source connection authentication only three options are provided(i.e annonymus/basic/windows),in Power bi desktop connection to api is created as below, it is working fine, data is loaded.
let
Source = Json.Document(Web.Contents(URL,[Query=[accountId= AccountIdvalue],
Headers=[#"MS-CorrelationId"= MSCorrelationIdValue,
#"MS-RequestId"=MSRequestIdvalue,
#"MS-Contract-Version"=MSContractVersionValue,
#"Ocp-Apim-Subscription-Key"=OcpApimSubscriptionKeyValue,
#"SecretKey"=SecretKeyValue ]])),
when i publish the same report to powerbi.com data source connection is failing with invalid credentials