Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
Hi
Anyone tried using the new Azure Key Vault references feature?
I think it was part of the Q1 2025 feature drop but looks only partially implemented to me.
We now have a new tab under "Manage Connections and Gateways" called "Azure Key Vault references". Under there we can successfully create entrries to reference Azure Key Vault resources created within our tenant.
How do we reference them? There appears to be no documentation on this that I can find.
If we have a Cloud Connection to Azure Blob Storage - Happy Days. A neat little Key Vault icon next to the authentication credentials field.... just click on that and enter your key vault reference.
Any other connections? I can't see any way of connecting. No nice little icons, and no way of entering teh key vault reference for a connection.
Can anyone advise how this new feature is supposewd to be used?
Hi @onerbreno
If your Fabric notebook isn't fetching secrets with mssparkutils.credentials.getSecret(), here are a few troubleshooting stesps to look out for:
Note:For refrence check the below link for supported connectors and authentication types.
Azure Key Vault Reference overview (Preview) - Microsoft Fabric | Microsoft Learn
FYI
If the above information is helpful, please give us Kudos and mark the response as Accepted as solution.
Best Regards,
Community Support Team _ C Srikanth.
Hi @willparker1
Please check the below points that might resolve your issue:
from notebookutils import mssparkutils
secret = mssparkutils.credentials.getSecret("YourKeyVaultName", "YourSecretName")
Best Regards,
Cheri Srikanth
Hi, @v-csrikanth!
I tested these steps but wasn’t successful. Could you help me understand what might be missing?
from notebookutils import mssparkutils
secret = mssparkutils.credentials.getSecret("YourKeyVaultName", "YourSecretName")
Hi @willparker1 ,
You’ve raised a spot-on summary of the current Azure Key Vault References feature in Microsoft Fabric. As of now, the implementation is indeed quite limited and mainly targets specific scenarios:
from notebookutils import mssparkutils secret = mssparkutils.credentials.getSecret("YourKeyVaultName", "YourSecretName")
Community feedback (including yours) is very valuable here—Microsoft often expands these features in response to real-world use cases. If you haven’t already, consider submitting your experience and requirements via the official Fabric Ideas portal.
If you need workarounds for other connection types, or want to discuss secure secret management strategies, happy to brainstorm further! You’re definitely not alone in wanting a more universal and documented solution.
Let me know if you have any follow-up questions or want more concrete examples.
Hi @burakkaragoz!
I tried using this method with mssparkutils, but I couldn’t access the secret. Could you explain it a bit more or help me understand what might be missing? I’m using a notebook in Fabric and have already assigned the "Key Vault Secrets User" role to the workspace, but it still didn’t work.
Thanks for sharing your experience—this is a common stumbling block! Let’s go through a checklist and some troubleshooting steps to get mssparkutils working with Azure Key Vault in Fabric notebooks:
Role Assignment Propagation:
Scope of Role Assignment:
Key Vault Firewall/Networking:
Secret Name and Case Sensitivity:
Notebook Identity:
Sample Working Code:
import mssparkutils secret = mssparkutils.credentials.getSecret("YourKeyVaultName", "YourSecretName") print(secret)
Testing from Azure Portal:
If after all this you’re still getting blocked, could you paste the exact error message you receive? That’ll help narrow down whether it’s a permissions, network, or configuration issue.
Let me know how it goes—I’m happy to help you troubleshoot further!
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
Hi, @burakkaragoz!
After some research, I understand that it's still not possible to authenticate to Azure Key Vault using the workspace identity in notebooks.
If there's any additional detail or update about this, I’d really appreciate it if you could share.
Thank you!
Hello, @burakkaragoz! Thank you very much for your reply.
Unfortunately, I still haven't been successful.
I granted the "Key Vault Secrets User" role to the Workspace Identity, and to be sure, I also assigned the "Admin" permission to the Fabric workspace.
To test, I’m asking a user without permissions on the Azure Key Vault to run the notebook in the configured workspace. This user has the "Contributor" role in the workspace.
Below is the error returned:
403 Forbidden
{
"error": {
"code": "Forbidden",
"message": "Caller is not authorized to perform action on resource.
If role assignments, deny assignments or role definitions were changed recently, please observe propagation time.
Caller:
appid={user_entra_id}
oid={id}
iss=https://sts.windows.net/c91d481c-40b4-4ff9-8f2e-a00df534d8b7/
Action:
'Microsoft.KeyVault/vaults/secrets/getSecret/action'
Resource:
'/subscriptions/{subscription_id}/resourcegroups/rg-demos/providers/microsoft.keyvault/vaults/akv-dtx-demo/secrets/teste'
Assignment: (not found)
DenyAssignmentId: null
DecisionReason: null
Vault: akv-dtx-demo; location=eastus2",
"innererror": {
"code": "ForbiddenByRbac"
}
}
}
In the error body, under "Caller", I noticed that the "oid" field corresponds to the Entra ID of the user running the notebook, which indicates that this identity is being used to authenticate with the Key Vault, not the Workspace Identity.
I wasn't able to identify which resource the provided "appid" refers to.
Additional notes:
Key Vault firewall/network settings: configured to Allow public access from all networks
Secret name: confirmed to be correct
Role propagation: I’ll wait a few hours to see if the issue persists
If you have any further suggestions or if I missed something, I’d really appreciate your input.
Hi @willparker1
Following up on our last response. Was it useful? If you need more details, we’re glad to help.
If it worked for you, consider clicking Accept as Solution and adding a Kudos.
Best Regards,
Community Support Team _ C Srikanth.
Hi @willparker1
I wanted to follow up since I haven't heard from you in a while. Have you had a chance to try the suggested solutions?
If your issue is resolved, please consider marking the post as solved. However, if you're still facing challenges, feel free to share the details, and we'll be happy to assist you further.
Looking forward to your response!
Best Regards,
Community Support Team _ C Srikanth.
Hi @willparker1
We haven't heard from you since last response and just wanted to check whether the solution provided has worked for you. If yes, please Accept as Solution to help others benefit in the community.
Thank you.
If the above information is helpful, please give us Kudos and mark the response as Accepted as solution.
Best Regards,
Community Support Team _ C Srikanth.
Hi @willparker1
You're right, mssparkutils is deprecated in Microsoft Fabric. The supported way to access Azure Key Vault secrets in Fabric is by using mssparkutils inside Fabric notebooks only:
from notebookutils import mssparkutils
secret = mssparkutils.credentials.getSecret("YourKeyVaultName", "YourSecretName")
This works only inside Fabric notebooks, not in standalone Python scripts. Make sure your Fabric workspace identity has access to the Key Vault with the "Key Vault Secrets User" role. No need to store usernames or passwords manually. For external Python scripts, use Azure SDK instead.
If the above information helps you, please give us a Kudos and marked the Accept as a solution.
Best Regards,
Community Support Team _ C Srikanth.
Hi @willparker1
The current partial implementation and limitations, the best approach to use Azure Key Vault references in Microsoft Fabric is:
Use Azure Key Vault references primarily with Azure Blob Storage connections, where native UI support exists to select and inject secrets securely.
For ArcGIS and Power BI scenarios, use Fabric notebooks to preprocess data with Key Vault secrets, then connect Power BI to the processed data, ensuring the latest Power BI Desktop version for compatibility.
If the above information helps you, please give us a Kudos and marked the Accept as a solution.
Best Regards,
Community Support Team _ C Srikanth.
Hi Support
Thanks for the response.
One follow on query - you mentioned mssparkutils. I understood this was demised for Fabric in favour of notebookutils? Certainly mssaprkutils unavailable for Python scripts.
Appreciate any advice.
Kind Regards
Will
2nd the fact there is no documentation, also noticed that at the same time this feature was released all of a sudden Conditional Access policies started blocking us using our pre-existing Web2 connections to our AKV... effectively downing any pipelines which were using it.
Really poor behaviour in terms of releasing features like this - expect much more in terms of release notes and how to use.
Hi @willparker1,
I haven't tested it yet myself, but I would assume it's meant to work similarly to how Azure Key Vault references are used in other Azure resources. The expected format seems to follow the same structure as in, for example, App Services or Logic Apps.
You can try referencing your secret using one of the following formats:
@Microsoft.KeyVault(SecretUri=https://myvault.vault.azure.net/secrets/mysecret)
Or alternatively:
@Microsoft.KeyVault(VaultName=myvault;SecretName=mysecret)
If that works for you, feel free to mark this as the solution so others can benefit as well!
Hi Diana
Thanks so much for responding.
Unfortunately there is no option to use dynamic content in the connection set up field.
There is actually one type of connection that allows you to reference the key vault - a Blob Storage connection. In that dialog, you are given a side icon allows you to select a property from an Azure Key Vault then it replaces it with the value, (see below). However this elegant solution is unavailable on any other connection type I can find, (and no other option I can see is available to reference the Azure Key References, making them kinda useless...
Thanks
Will
User | Count |
---|---|
69 | |
39 | |
15 | |
14 | |
5 |
User | Count |
---|---|
73 | |
65 | |
25 | |
8 | |
7 |