Azure / Azure/MachineLearningNotebooks

Model Loading in Azure Databricks Failing even after Service Principal Authentication

オープン
#1,266 コメント 8 件 リアクション 1 件 担当者 1 名 @shbijlan が担当を希望しています GitHub で見る
ADO bug Pipelines
主要言語
Jupyter Notebook
スター
4.4k
フォーク
2.6k
PR マージ指標
30日以内にマージされた PR はありません

説明

I am trying to run a `DatabricksStep`. I have used `ServicePrincipalAuthentication` to authenticate the run:

appId = dbutils.secrets.get(, )
tenant = dbutils.secrets.get(, )
clientSecret = dbutils.secrets.get(, )
subscription_id = dbutils.secrets.get(, )
resource_group =
workspace_name =

svc_pr = ServicePrincipalAuthentication(
tenant_id=tenant,
service_principal_id=appId,
service_principal_password=clientSecret)

ws = Workspace(
subscription_id=subscription_id,
resource_group=resource_group,
workspace_name=workspace_name,
auth=svc_pr
)

The authentication is successful since running the following block of code gives the desired output:

subscription_id = ws.subscription_id
resource_group = ws.resource_group
workspace_name = ws.name
workspace_region = ws.location
print(subscription_id, resource_group, workspace_name, workspace_region, sep='\n')

However, the following block of codes gives an error:

model_name=
model_path = Model.get_model_path(model_name=model_name, _workspace=ws)
loaded_model = joblib.load(model_path)
print('model loaded!')

This is giving an error:

```
UserErrorException:
Message:
Operation returned an invalid status code 'Forbidden'. The possible reason could be:
1. You are not authorized to access this resource, or directory listing denied.
2. you may not login your azure service, or use other subscription, you can check your
default account by running azure cli commend:
'az account list -o table'.
3. You have multiple objects/login session opened, please close all session and try again.

InnerException None
ErrorResponse
{
"error": {
"message": "\nOperation returned an invalid status code 'Forbidden'. The possible reason could be:\n1. You are not authorized to access this resource, or directory listing denied.\n2. you may not login your azure service, or use other subscription, you can check your\ndefault account by running azure cli commend:\n'az account list -o table'.\n3. You have multiple objects/login session opened, please close all session and try again.\n ",
"code": "UserError"
}
}

```

Why is there a Forbidden Error when Authentication was successful?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。