关于python:Azure-python-代码报错AADSTS500011-问题解决方法

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"]
)

起因:

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理