Forum Discussion
Power Query SDK - use user input as parameter of helper functions
- 10 months ago
Hi Anonymous
Fabric now supports workspace identity(Managed Identity), a managed service principal that can authenticate to Azure resources without secrets.
References : Authenticate with Microsoft Fabric workspace identity - Microsoft Fabric | Microsoft Learn
Connector Extensibility in Power BI - Power BI | Microsoft Learn
Hope this helps !!
Thank You.
Hi Anonymous
Just checking in to see if the previous response helped resolve your issue. If not, feel free to share your questions and we’ll be glad to assist.
hello v-aatheeque
thanks for response. previous comment is not solving my question.
So - what I am trying to achieve - is to enhance security in my custom connector created in Power Query SDK.
I am connecting to WEB API sending bearer token created using Oauth authentication (with StartLogin, FinishLogin, TokenMethod functions etc..)
Currently my Azure client_secret is hardcoded in my code. I am wondering how I could improve on this topics - for example to take client_secret as user input and send it to FinishLogin method or maybe to keep it in Azure Vault and later reference it in code. Is any of these options possible?
- v-aatheeque10 months ago
Community Support
Hi Anonymous
- Power Query SDK does not support runtime access to external secrets like Azure Key Vault.
- Avoid hardcoding the client_secret in your code.
- Taking client_secret as user input is possible but insecure and not recommended.
- Use Managed Identity or let Power BI/Fabric handle OAuth2 so the secret stays securely stored in the service.
- Anonymous10 months agoNot applicable
hello v-aatheeque
thank you for your response. could you elaborate on last 2 points?
- Taking client_secret as user input is possible but insecure and not recommended.
how is that possible? as I have investigated, you can only take user input in main function. client_secret is being used in TokenMethod function, which runs before main function - this means there should be no possibility of doing this.
- Use Managed Identity or let Power BI/Fabric handle OAuth2 so the secret stays securely stored in the service.
do you have any useful sources on these?
- v-aatheeque10 months ago
Community Support
Hi Anonymous
Fabric now supports workspace identity(Managed Identity), a managed service principal that can authenticate to Azure resources without secrets.
References : Authenticate with Microsoft Fabric workspace identity - Microsoft Fabric | Microsoft Learn
Connector Extensibility in Power BI - Power BI | Microsoft Learn
Hope this helps !!
Thank You.