Powershell command to set password complexity policy in Azure AD

Chopra 126 Reputation points
2021-10-01T20:12:00.247+00:00

Will be moving my users to AD cloud and disconnecting the AAD connect

How can I set the password complexity to meet the following requirements

Minimum characters 12
Cannot contain login name or name of the user
Contains alphanumeric characters
Max pwd age 90 days
Min pwd age 24hrs
History - last 15 passwords

Microsoft Security Microsoft Entra Microsoft Entra ID
0 comments No comments
{count} votes

Accepted answer
  1. Siva-kumar-selvaraj 15,721 Reputation points
    2021-10-01T20:40:39.727+00:00

    Hello @Chopra ,

    Thanks for reaching out.

    You can't customize Azure AD default password policy. Some of these password policy settings can't be modified, though you can configure custom banned passwords for Azure AD password protection or account lockout parameters

    To know more about Azure AD password policies, refer.

    Hope this helps.

    ------
    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


2 additional answers

Sort by: Most helpful
  1. Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
    2021-10-02T05:22:39.767+00:00

    The only thing you can modify is the max password age and notification window, this is done via the Set-MsolPasswordPolicy cmdlet on a per-domain basis. If you want more control over this, or to enforce your AD policies, consider using federation or pass-trough authentication.

    1 person found this answer helpful.

  2. Mr Sb 371 Reputation points
    2021-10-03T00:27:07.96+00:00

    You shouldn't.

    Don't focus to much on making passwords complex because this will not increase security. Focus on:

    1. Implementing MFA.
    2. Disable legacy authentication.
    3. Implement Azure Identity protection (leaked passwords, risky users / sign-ins)
    4. etc etc
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.