azure-sdk-python

How do you turn a principal_id into a username using the Azure Python SDK

别来无恙 提交于 2020-12-15 04:56:00
问题 Using the Azure Python SDK I'm trying to build a script that will audit our various user role authorizations. I'm able to pull a list of role assignments using the following: authorizationClient = AuthorizationManagementClient(credential, subscription_id) roles = authorizationClient.role_assignments.list() This works, and I get a list of dicts that seems to have every piece of info I need except the principal_name. Example response: {'additional_properties': {}, 'id': '/providers/Microsoft

How do you turn a principal_id into a username using the Azure Python SDK

别来无恙 提交于 2020-12-15 04:54:50
问题 Using the Azure Python SDK I'm trying to build a script that will audit our various user role authorizations. I'm able to pull a list of role assignments using the following: authorizationClient = AuthorizationManagementClient(credential, subscription_id) roles = authorizationClient.role_assignments.list() This works, and I get a list of dicts that seems to have every piece of info I need except the principal_name. Example response: {'additional_properties': {}, 'id': '/providers/Microsoft

Authenticating to Azure Key Vault locally using DefaultAzureCredential

﹥>﹥吖頭↗ 提交于 2020-12-15 02:01:38
问题 I am attempting to run this 'Retrieve a secret from the vault' example locally (Ubuntu 19.10) to retrieve a secret from an Azure Key Vault: from azure.keyvault.secrets import SecretClient from azure.identity import DefaultAzureCredential client = SecretClient(vault_url="https://<<vaultname>>.vault.azure.com", credential=DefaultAzureCredential()) secret = client.get_secret("<<mysecret>>") However I receive the following error: azure.core.exceptions.ClientAuthenticationError: No credential in

Authenticating to Azure Key Vault locally using DefaultAzureCredential

大憨熊 提交于 2020-12-15 01:55:36
问题 I am attempting to run this 'Retrieve a secret from the vault' example locally (Ubuntu 19.10) to retrieve a secret from an Azure Key Vault: from azure.keyvault.secrets import SecretClient from azure.identity import DefaultAzureCredential client = SecretClient(vault_url="https://<<vaultname>>.vault.azure.com", credential=DefaultAzureCredential()) secret = client.get_secret("<<mysecret>>") However I receive the following error: azure.core.exceptions.ClientAuthenticationError: No credential in

Authenticating to Azure Key Vault locally using DefaultAzureCredential

旧时模样 提交于 2020-12-15 01:54:22
问题 I am attempting to run this 'Retrieve a secret from the vault' example locally (Ubuntu 19.10) to retrieve a secret from an Azure Key Vault: from azure.keyvault.secrets import SecretClient from azure.identity import DefaultAzureCredential client = SecretClient(vault_url="https://<<vaultname>>.vault.azure.com", credential=DefaultAzureCredential()) secret = client.get_secret("<<mysecret>>") However I receive the following error: azure.core.exceptions.ClientAuthenticationError: No credential in