我尝试在azure cli
上使用命令python
登录,但是我遇到了问题。
脚本代码为:
from azure.common.credentials import ServicePrincipalCredentials
credentials = ServicePrincipalCredentials(
client_id = 'a1bc23d4-e5fg-6hi7-8901-23456j7kl8mn',secret = '112233445566',tenant = 'z0y987x-6543-2w1v-0987-6u5t4s32109r'
)
msrest.except ions.AuthenticationError:,AdalError: Get Token request returned http error: 400 and server response: {"error":"invalid_request","error_description":"ZZBXQH1775: Tenant 'z0y987x-6543-2w1v-0987-6u5t4s32109r' not found. This may happen if there are no active subscriptions for the tenant. Check with your subscription administrator.
我使用Visual Studio代码工作