How to remove password expiration in Azure AD
To follow this guide you will need:
The correct role: the Password Administrator, or Global Administrator roles are needed to perform these steps.
Step 1
Navigate to the Password expiration policy section of Security and Privacy page in the Microsoft 365 admin center.
Step 2
Uncheck the box that says "Set user passwords to expire after a number of days"