Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi,
I have a use case where I'm writing a custom M function that requires the username from the current data connector's connection. For example, I am connected to Teradata database using teradata database credentials, and I want to retrieve the username that was used while authenticating to Teradata database in my custom M function.
I'm defining this M function in custom data connector. I tried using Extension.CurrentCredential()[Username] to get the username from credentials but got the following error:
Expression.Error: We can only perform this operation while using a custom data connector.
Is there a way to do this?
Thanks,
Namrata
Solved! Go to Solution.
By design (and for security reasons), it is not possible for queries to access credential information.
Looks like another one for @ImkeF
I'm not familiar with this function. If nothing comes up here, I'd suggest asking on GitHub instead: https://github.com/Microsoft/DataConnectors/issues
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @ImkeF,
Thanks for the reply!
Extension.CurrentCredential() is mentioned in here in Data Connectors documentation:
Sure, I'll post this question on GitHub too.
Thanks,
Namrata.
By design (and for security reasons), it is not possible for queries to access credential information.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |