azure-keyvault

Azure AKS/Container App can't access Key vault using managed identity

Azure AKS/Container App can't access Key vault using managed identity Question: I have a docker container python app deployed on a kubernetes cluster on Azure (I also tried on a container app). I’m trying to connect this app to Azure key vault to fetch some secrets. I created a managed identity and assigned it to …

Total answers: 3

TypeError: string indices must be integers – while trying to read secret

TypeError: string indices must be integers – while trying to read secret Question: I try to read the value of my secret, which is in Azure key vault. To achieve this aim I try this code from here: from azure.identity import DefaultAzureCredential from azure.keyvault.secrets import SecretClient # Create a SecretClient using default Azure credentials credential …

Total answers: 1

unexpected keyword argument 'tenant_id' while accessing Azure Key Vault in Python

unexpected keyword argument 'tenant_id' while accessing Azure Key Vault in Python Question: I was trying to accessing my key vault, but I got always the same error: AppServiceCredential.get_token failed: request() got an unexpected keyword argument ‘tenant_id’ ManagedIdentityCredential.get_token failed: request() got an unexpected keyword argument ‘tenant_id’ This was the code I used in an Azure Machine …

Total answers: 2

azure python SDK retrieve backup items from recoverservices(backup)

azure python SDK retrieve backup items from recoverservices(backup) Question: I was told to move my bash script that reports on VM backup status, also reports VMs that are not being backed up to Azure automation account. I picked python since Automation Account doesn’t have bash and I have done python scripts before for system admin …

Total answers: 2

How to add Azure Python SDK exceptions to try/except statements?

How to add Azure Python SDK exceptions to try/except statements? Question: I’m new to Python. I have a working, monolithic Python program that I’m breaking into individual Python functions. I’d like to use the try: – except: pattern to catch specific exceptions for each function. Example: Create a Key Vault client and retrieve a secret …

Total answers: 1

VisualStudioCodeCredential.get_token failed

VisualStudioCodeCredential.get_token failed Question: I’m using a Jupyter Notebook within VS Code and the Azure Python SDK to develop locally. Relevant VS Code Extensions installed: Python Azure Account Azure Storage (maybe relevant?) Goal: To retrieve a secret from Azure Keyvault using DefaultCredential to authenticate Since there are no environment variables nor ManagedIdentity credentials, DefaultCredential should default …

Total answers: 3

How to Get Private Key from Certificate in an Azure Key Vault?

How to Get Private Key from Certificate in an Azure Key Vault? Question: I have a Certificate in an Azure Key Vault that I would like to extract a private key from. According to the Microsoft Docs: When a Key Vault certificate is created, an addressable key and secret are also created with the same …

Total answers: 3