Search code examples
javaazure-active-directorysmtp-auth

Forced password change issue when using an Azure AD account


I use an npa@****.onmicrosoft.com like azure AD account to send emails on my Java application. However, it seems that if the password of the account is not changed periodically, an email authentication error will occur. How can I work around this issue without having to periodically update the password on my Java application?


Solution

  • You are facing this issue due to the password expiry policy.

    You can Set an individual user's password to never expire. You can follow the Microsoft Document which helps you in fixing the issue.