0
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 3 years have passed since last update.

AzureADで作成したユーザのパスワード期限を無期限にする方法

Last updated at Posted at 2021-12-26

はじめに

 AzureADで作成したユーザは規定値でパスワード有効期限が90日で作成されます。
 MFAなどを使用する場合、有効期限は無期限の方がなにかと運用がしやすいためここでは
 パスワードを無期限にする方法を記載します。

パスワードを無期限にする方法

 残念ながらGUIでは変更できず、PowerShellを使用して変更する必要があります。

▢PowerShellでAzureADにグローバル管理者アカウントでサインイン

Connect-AzureAD

 初回接続時は以下のモジュールをimportしてから行う必要があります
 install-module azuread
 import-module azuread
::

▢パスワードポリシーを無期限に変更

Set-AzureADUser -ObjectId <user ID> -PasswordPolicies DisablePasswordExpiration

▢パスワードポリシーの確認

Get-AzureADUser -ObjectId <user ID> | Select-Object @{N="PasswordNeverExpires";E={$_.PasswordPolicies -contains "DisablePasswordExpiration"}}

上記で出力される結果が「True」となっていればパスワードは無期限に設定されています。

補足

・Azure AD connectでオンプレADから同期されたアカウントは無期限で作成されます。
 これはオンプレADのパスワードポリシーを優先する設計のためです。

・Microsoft365管理センターで作成したユーザは規定値90日で作成されますが、
 Microsoft365管理センターのパスワードポリシーが優先され、規定値は無期限となります。
 

参考

 Azure Active Directory のパスワード ポリシーとアカウント制限
 
 

 

0
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
0
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?