Docs Error Library Authentication Errors Error: invalid_client: AADSTS7000222

Error: invalid_client: AADSTS7000222

What Is Causing This Error?

When setting up an SMTP plugin with the Outlook mailer, you might come across the error ‘invalid_client: AADSTS7000222: The provided client secret keys are expired’. This simply means the client secret, which you’ve set up in Azure, has expired.

Microsoft, for security purposes, automatically assigns expiration dates to these client secrets. When the secret key expires, it can no longer be used to authenticate your connection, resulting in this error.

Resolving the Error – Solution

To fix the ‘invalid_client: AADSTS7000222’ error, you’ll need to create a new client secret in your Azure portal because the old one has expired.

We’ll show you how to fix this using Easy WP SMTP as an example.

Start by opening your Azure Portal and heading to the App registrations section. Once in your application, click on Certificates & secrets in the left sidebar and generate a new client secret.

Note: If you need a step-by-step guide on how to generate this key, check out Easy WP SMTPs’s guide on the Outlook mailer.

After creating the new secret key, copy the password in the Value column. Then, go to Easy WP SMTP’s settings and paste it into the Application Password field.

That’s it! Now you know how to fix the ‘ADSTS7000222: client secret keys expired’ error.

If you’d like to learn how to troubleshoot other similar errors, check out the following docs: