Forum Discussion

datakohai12's avatar
datakohai12
Frequent Visitor
3 years ago
Solved

Microsoft Fabric connect to Azure Key Vault

Greetings everyone,    I am trying to establish a connection between my Microsoft Fabric notebook and an Azure KeyVault to access some secrets. Unfortunately, I am facing an issue with MSI while us...
  • Anonymous's avatar
    Anonymous
    3 years ago

    datakohai12  Thanks for sharing the steps Fabric currently does not support managed identity authentication which is what this is trying to authenticate via.  Until that's fully integrated, there's a simple workaround.  As long as you are executing notebook has access to the vault, the below will work.  

    from trident_token_library_wrapper import PyTridentTokenLibrary as tl

    access_token = mssparkutils.credentials.getToken("keyvault")

    tl.get_secret_with_token("https://vaultName.vault.azure.net/","secretName",access_token)

    Regards

    Geetha

     

  • Anonymous's avatar
    Anonymous
    3 years ago

    datakohai12 It wouldn't be present in pypi

    you should be able to execute that code directly in your Trident notebook if you're not able to send over a screenshot of the error.

     

    Regards

    Geetha

  • datakohai12's avatar
    datakohai12
    3 years ago

    Interesting is now working. Thanks.