Control your Office 365 users’ password policies

Control Office 365 Users' password policies - Step 1

Article sections

    Summary: This article takes you through the steps on how to control your Office 365 users’ password policies
    Article Type: Information for IT Admin role
    Related Product(s): This article relates to the following products:

    • Office 365
    Related Articles:
    • None

    How to control Office 365 users’ password policies

    Within Office 365 Admin Portal you have the ability to control the Global Password Policy for users; this allows you to select whether passwords expire, the days before passwords expire and the days before a user is notified about expiration. You can reach the settings by following the next image.

    Control Office 365 users' password policies

    Setting a Global Password Policy is great for security and inhouse processes however there may be times where you really need a user to be excluded from the Global Policy; this is not something that Microsoft will allow you to do without the use of an external tool. One scenario where you may want to ensure a User or Non-Interactive user retains its password is when it is being utilised as a connector for a solution, if the Password expires then the connection will be disrupted which some or all of the solution will not be working.

    The process for disabling expiration of a password for a single user is defined as the following:

    1. Ensure you have installed the Azure AD PowerShell Module from here.
    2. Using your company administrator credentials, connect to Windows PowerShell
    3. Execute the following command:

    “Set -MsolUser -UserPrincipalName <user ID> -PasswordNeverExpires $true

    This will set the users Password to never expire, the warning that comes with this is that the age of the password still exists and will still count each day. This means that should you reenable expiration at 90 days, any password that is 90 or more days old, will have a password reset enforcement.

    If you are looking to find out the status of all users to find out whether their passwords are set to expire or not, you have use the following command:

    “Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires”

    For more commands and further information, the full Microsoft Support article and source of this KB can be found at here.

    in GeneralHow-toMicrosoftTroubleshooting
    Share This Post
    Share on facebook
    Share on linkedin
    Share on twitter
    Share on email
    More To Explore

    Ready to Talk about your Project?
    Book a free Discovery Call

    A no obligation call to discuss your business needs and project requirements. During the call, our consultant will explain how we can help you to achieve your goals and answer any questions you may have.