0

I have ml code running in Azure ML workspace. The same code is deployed Aks cluster deployed vnet using Azure MLops pipeline through inference cluster. Key-vault is created for storing variables accessed within jupyter notebook

While testing the endpoint from Postman getting "managedidentitycredential.get_token failed: managedidentitycredential authentication unavailable, no managed identity endpoint found" error.

In code, trying to access key-vault variables by the below method.
credentials = DefaultAzureCredential()
client = SecretClient(vault_url="url", credential=credentials)
access_key = client.get_secret("KEY").value

Please help, how to access key vault here? 

Thanks.
Coder
  • 39
  • 7

1 Answers1

0

Refer to 'Using Secrets in Remote Runs' section in this sample to access Key vault.

https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/manage-azureml-service/authentication-in-azureml/authentication-in-azureml.ipynb

Configure managed identities for Azure resources on a VM using the Azure portal: https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/qs-configure-portal-windows-vm

Rutha
  • 751
  • 3
  • 7