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

4次阅读

共计 463 个字符,预计需要花费 2 分钟才能阅读完成。

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

起因:

正文完
 0