I have an active anaconda environment and sign in to azure with
then I run the code in Pycharm (I set the python interpreter to the environment) but the access to the keyvault raises an exception
credentials = DefaultAzureCredential() secret_client = SecretClient(vault_url, credentials) secret = secret_client.get_secret("my-secret") >>> azure.core.exceptions.HttpResponseError: (Unauthorized) AKV10032: Invalid issuer. Expected one of https://sts.windows
The authentication works in visual studio code with venv - so I think this is somehow related to the anaconda environment or Pycharm. Maybe 'az login' does not set the env variables in my anaconda environment? Does anyone have an idea?