如何使用KeyVault从Python连接到mlstudio工作区?

2024-04-25 06:39:46 发布

您现在位置:Python中文网/ 问答频道 /正文

如何使用KeyVault(在创建工作区时自动创建)连接到Azure ML Studio工作区?你知道吗

以下是我尝试连接到工作区的方式:

from azureml.core import Workspace
from azureml.core.authentication import ServicePrincipalAuthentication

svc_pr = ServicePrincipalAuthentication(
    tenant_id="xxx",
    service_principal_id="yyy",
    service_principal_password="zzz")
ws = Workspace.from_config(auth=svc_pr)

但是得到一个错误:

You are currently logged-in to *** tenant. You don't have access to xxx subscription, please check if it is in this tenant. All the subscriptions that you have access to in this tenant are = \n [].


Tags: toinfromcoreimportyouidprincipal
1条回答
网友
1楼 · 发布于 2024-04-25 06:39:46

此错误表示中指定的订阅配置.jsonServicePrincipalAuthentication对象中指定的租户下不存在文件。你知道吗

要检查某个租户下是否存在订阅,可以首先使用Azure CLI命令az account show查看租户ID,然后使用命令az account list查看该租户中订阅的列表。你知道吗

相关问题 更多 >