Forum Discussion
arindamp
2 years agoNew Member
Unable to fetch access_token from Extension.CurrentCredential()
Hi experts I am building a PowerQuery Custom Connector (for Zoho APIs) in Visual Studio to be deployed to Power BI. While debugging/launching from Visual Studio, I can see the data being fetched fr...
Anonymous
2 years agoNot applicable
Hi arindamp
Please make sure that the access token is right,
e.g
MyConnector.Raw = (_url as text) as binary =>
let
apiKey = Extension.CurrentCredential()[Key],
headers = [
#"x-APIKey" = apiKey,
Accept = "application/vnd.api+json",
#"Content-Type" = "application/json"
],
request = Web.Contents(_url, [ Headers = headers, ManualCredentials = true ])
in
request
and you can refer to the following link.
Handling authentication for Power Query connectors - Power Query | Microsoft Learn
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
arindamp
2 years agoNew Member
Hi Anonymous
The access token name is right, as it all works fine from Visual Studio.
The issue only happens when the Connector has been deployed to Power BI.