1. Login to the O365 Admin Panel.
Office 365 Admin Login URL: https://portal.office.com/
2. Click on the gear sign mentioned on the left hand side menu and click on Security & Privacy.
3. Now click on the Edit option as shown on the figure below.
4. Now enable the slider of Set user passwords to never expire and click on the Save.