🔥

Azure CLIを使う

2022/07/30に公開

概要

前提

個人アカウントでAzure Portalを利用している

作業

az login

az login で ユーザ名@outlook.com を指定してログインすると失敗する。

$ az login -u ユーザ名@outlook.com
Password:
Authentication failed due to error of 'Unsupported wstrust endpoint version. Current support version is wstrust2005 or wstrust13.' This typically happens when attempting a Microsoft account, which requires interactive login. Please invoke 'az login' to cross check. More details are available at https://github.com/AzureAD/microsoft-authentication-library-for-python/wiki/Username-Password-Authentication

これは、上記にある通り、アカウントがMicrosoftアカウントの場合、Microsoftアカウントが非対話型ログインをサポートしていないからである。

Azure CLI を使用してサインインする — ログインと認証 | Microsoft Docs

上記にある通り、単に、

$ az login

として、指示に従いブラウザでのログインを行うことでログインできる。

Discussion