error:
明天 python sdk 登录到 Azure 时常遇到”azure.core.exceptions.ClientAuthenticationError: Authentication failed: AADSTS500011 The resource principal named https://management.azure.com was not found“这个谬误。
- 替换 https://management.azure.com 为国内地址即 可 management.chinacloudapi.cn
参照如下即可解决
compute_client = ComputeManagementClient(
credential=credential,
subscription_id=Subscription_Id,
base_url='https://management.chinacloudapi.cn',
credential_scopes=["https://management.chinacloudapi.cn/.default"]
)