Forum Discussion

partofthejob's avatar
partofthejob
Regular Visitor
1 month ago
Solved

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?

  • v-abhinavmu's avatar
    v-abhinavmu
    1 month ago

    Hi partofthejob​,

    Yes, that is the distinction reflected in the current Microsoft documentation. The documented workflow for creating the Azure Key Vault reference itself is through Manage Connections and Gateways in Fabric.

    The Fabric REST API documentation separately describes how an existing Key Vault connection can be referenced when creating supported connections through the API.

    As a next step, you can create the Azure Key Vault reference through Manage Connections and Gateways, then use its connection ID when creating supported connections through the REST API.

    I hope this helps. Please feel free to reach out if you have any further questions.
    Thank you.

6 Replies

  • this could be very useful for my job as well +1 👍

     

    EW26{BL4M3_TH3

  • v-abhinavmu's avatar
    v-abhinavmu
    Icon for Community Support rankCommunity 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 Learn

    I hope this helps. Please feel free to reach out if you have any further questions.
    Thank you.

    • partofthejob's avatar
      partofthejob
      Regular Visitor

      Hi, thanks for the reply. So if i understand correctly, there is not yet an API available for actual creation of the Key Vault Reference itself? Currently creating is only supported through the portal? 

      • v-abhinavmu's avatar
        v-abhinavmu
        Icon for Community Support rankCommunity Support

        Hi partofthejob​,

        Yes, that is the distinction reflected in the current Microsoft documentation. The documented workflow for creating the Azure Key Vault reference itself is through Manage Connections and Gateways in Fabric.

        The Fabric REST API documentation separately describes how an existing Key Vault connection can be referenced when creating supported connections through the API.

        As a next step, you can create the Azure Key Vault reference through Manage Connections and Gateways, then use its connection ID when creating supported connections through the REST API.

        I hope this helps. Please feel free to reach out if you have any further questions.
        Thank you.

  • v-abhinavmu's avatar
    v-abhinavmu
    Icon for Community Support rankCommunity Support

    Hi partofthejob​,

    I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. 

    Thank you.

  • v-abhinavmu's avatar
    v-abhinavmu
    Icon for Community Support rankCommunity Support

    Hi partofthejob​,

    May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.


    Thank you