subscription_id = os.environ["AZURE_SUBSCRIPTION_ID"]
tenant_id = os.environ["AZURE_TENANT_ID"]
client_id = os.environ["AZURE_CLIENT_ID"]
client_secret = os.environ["AZURE_CLIENT_SECRET"]
credentials = ClientSecretCredential(tenant_id=tenant_id, client_id=client_id, client_secret=client_secret)
kv_client = KeyVaultManagementClient(credentials, subscription_id)
I tried to authenticate using;
credentials=ServicePrincipalCredentials(client_id=client_id,secret=client_secret,tenant=tenant_id)
as well
but I got the following error:
'ServicePrincipalCredentials' object has no attribute 'get_token'. Did you mean: 'set_token'?
Could You explain what is the cause of the problem and how could it be resolved?
Thanks in advance,