Forum Discussion
nvijay
3 years agoFrequent Visitor
Extension.CurrentCredential wasn't recognized - ERROR while Getting User Credentials in Power Query
Hi Inspite of being mentioned on Microsoft website (Handling authentication for Power Query connectors - Power Query | Microsoft Learn) that User credentials can be fetched using Extension.Curren...
clongaw
2 years agoFrequent Visitor
I cannot speak to all the circumstances, but from experience I have been able to use Extension.CurrentCredential() for global variable declaration in a local Custom Connector not verified or published by Microsoft. This case should prompt the user for entering a username and password before running the DataSource.Kind function with it's parameters. However, I have had difficulty in using Extension.CurrentCredential() in function definitions such as RefreshLogin for OAuth flow.
username = Extension.CurrentCredential()[Username];
password = Extension.CurrentCredential()[Password];