1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

外部テナント上のAzure Machine Learningへの接続

Posted at

はじめに

開発用テナントなど、外部のテナントでAzure Machine Learning (以下、AML)にAML SDKから接続する場合にひと手間必要だったためメモ

参考リンク

コード

  • 通常のAML接続
  • 対処方法

通常のAML接続

チュートリアルとかだとこのような形です。

py
ws = Workspace.from_config()

この時、AMLが外部にAzureAD環境だと失敗します。

対処方法

ひと手間加えて、以下のように一度テナントを指定して認証しておきます。

py
from azureml.core.authentication import InteractiveLoginAuthentication
auth=InteractiveLoginAuthentication(force=True, tenant_id="<Tenant ID>")

認証をパラメータに渡せばOK

py
ws = Workspace.from_config(auth=auth)

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?