Hope you are using Azure active directory and not local AD. Here are suggested steps and let me know if you still needed help.
Notify Users About Password Expiration 14 Days in Advance:
- notify users about password expiration, follow these steps:
a. Sign in to the Azure portal (https://portal.azure.com) as an administrator or Global Admin.
b. Navigate to "Azure Active Directory" > "Security" > "Authentication methods" > "Password reset."
c. Under the "Password reset" settings, you can configure the "Notify users on password expirations" option. Set the desired number of days before password expiration (e.g., 14 days).
d. Save your settings.
Azure AD will now send email notifications to users 14 days before their password expires.
- Set Individual User's Password to Never Expire:
In Azure AD, user password settings are managed at the individual user level. To set a user's password to never expire, follow these steps:
a. Sign in to the Azure portal as an administrator.
b. Navigate to "Azure Active Directory" > "Users" and select the user for whom you want to set the password to never expire.
c. In the user's settings, go to "Authentication methods."
d. Under "Password reset," you can configure the "Require user to change password on next sign-in" option. Disable this option.
e. Save the user's settings.
With this configuration, the user's password will no longer expire.