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.

Powershell上でAzureADの認証エラーの対処法

1
Last updated at Posted at 2021-04-18

エラー発生

PowerShellでAzureADへの接続時、以下のエラーが発生した。
($credential = Get-Credentialは実行済み。)

Connect-AzureAD -Credential $credential
Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access 'xxx'.

+ CategoryInfo : 認証エラー: (:) [Connect-AzureAD]AadAuthenticationFailedException

対処法

今回はAzureAD上で多様素認証を有効にしていた。そのため-Credential $credentialは必要なく、単純にConnect-AzureADを実行すると自動で多様素認証の画面が出てくる。
そこで画面に従い必要情報を入力すれば、接続できる。

参考
https://docs.microsoft.com/ja-jp/microsoft-365/enterprise/connect-to-microsoft-365-powershell?view=o365-worldwide
https://nozangyo.com/powershell_office365_setting/
ひと目でわかるOffice 365導入・運用管理編 (マイクロソフト関連書)

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?