Forum Discussion
Is creating an Azure Key Vault reference supported through REST API?
I'm trying to automate the creation of an Azure Key Vault reference
I can list existing key vault connncections created through the portal using:
GET https://api.fabric.microsoft.com/v1/connections
However, I have not been able to create one using:
POST https://api.fabric.microsoft.com/v1/connections
The supported connection types response lists AzureKeyVault with OAuth2 and service-principal authentication, but I cannot find a documented working example. OAuth2 creation appears to use undocumented Power BI endpoints through the portal, while service-principal creation returns an invalid credentials error (valid credentials, rbac assigned, public open key vault..).
is creating an Azure Key Vault connection/reference currently supported through a public API? If so, could someone share a working request example? Or must these connections currently be created manually through the portal?
2 Replies
- michiboo1New Member
this could be very useful for my job as well +1 👍
- v-abhinavmu
Community Support
Hi partofthejob​,
Thanks for reaching out to the Microsoft Fabric Community forum.
Based on the current Microsoft documentation, there are two aspects to consider:
• Creating the Azure Key Vault reference: The Azure Key Vault references documentation describes creating the reference through Fabric > Manage Connections and Gateways > Azure Key Vault references > New. This is the documented creation workflow for the Azure Key Vault reference.
• Referencing Azure Key Vault secrets through the REST API: The Create Connection REST API defines KeyVaultSecretReference, which contains the connectionId of the Key Vault connection and the secretName stored in Azure Key Vault. It can be used with credential properties such as passwordReference, keyReference, tokenReference, and servicePrincipalSecretReference. The API documentation also provides a SQL connection example using passwordReference.
• Checking supported connection types: The List Supported Connection Types API can be used to retrieve the supported connection types, creation methods, parameters, and credential types.
Therefore, the documented REST API supports referencing Azure Key Vault secrets when creating supported connections. The documented creation workflow for the Azure Key Vault reference itself is through Manage Connections and Gateways.
For more details, please refer to the below Official Microsoft documentation:
• Configure AKV references - Microsoft Fabric | Microsoft Learn
• Connections - Create Connection - REST API (Core) | Microsoft Learn
• Connections - List Supported Connection Types - REST API (Core) | Microsoft LearnI hope this helps. Please feel free to reach out if you have any further questions.
Thank you.