In common with most platforms, Office 365 has a mechanism of password policies to set intervals after which a password must be changed; however there are cases where it may not be desirable to force password changes. In those cases, it’s possible to disable password expiry.
I came across an issue recently though where, once the password expiry notification was displayed in the Office 365 portal, even changing the account to disable password expiry wouldn’t dismiss the notification. I think this only occurs if the password expiry has been disabled after the initial notification has triggered. I’m not sure what would have happened if I had left it to run through to expiry (I didn’t, because that would have clashed with a major milestone on our project) but it seems I’m not alone in experiencing this.
In the end, the only way I could get the notification to disappear was to changed the password (after which I changed it back again…).