Docs Error Library Configuration Errors Error: Invalid Client Secret

Error: Invalid Client Secret

What Is Causing This Error?

The ‘invalid_client: AADSTS7000215: Invalid client secret provided’ error typically occurs when setting up your SMTP plugin with the Outlook mailer. This usually happens if you use the Secret ID field instead of the Value field from the Microsoft Azure portal.

In the Azure portal, each client secret includes an expiration date, a value field, and a secret ID field. Remember to use the information in the Value field when setting up Outlook to avoid this error

Value in Azure client secret

Resolving the Error – Solution

To resolve this error, you’ll need to delete the existing client secret in your Microsoft Azure portal and create a new one. After getting the right information from the Value field, copy and paste it into the plugin settings. Then, go ahead and reauthorize the plugin.

We’ll explain this process using Easy WP SMTP as an example.

Start by logging into your log into your Microsoft Azure portal. Once there, proceed to the App registrations section by typing App registrations in the search bar at the top of the page.

App registrations in Azure

Once in your application, click on Certificates & secrets in the left sidebar.

Click on Certificates & secrets

Here, you’ll have to delete your existing client secret.

Delete Client secret

The next step involves creating a new client secret.

Click on the + New client secret button to proceed. This will open up an overlay, and here you’ll need to fill out a short form.

Click on new client secret

Once you’ve submitted the client secret form, a client secret will be generated.

Go ahead and copy the Value from the client secret and then return to your Easy WP SMTP settings to continue the process.

Copy Value from Client secrets

Note: Remember, it’s the Value we need, not the Secret ID.

Once you’ve returned to your Easy WP SMTP settings, paste this value into the Application Password field.

Paste Value in Application Password field

Once done, click the Save Settings button at the bottom of the page.

In the next step, you would need to reauthenticate Easy WP SMTP with your mailer.

Go to Easy WP SMTP » Settings, scroll to the bottom of the page, and click the Remove Connection button.

Remove Microsoft connection

Once the page has reloaded, click Allow plugin to send emails using your Microsoft account next.

Click button to reauthorize authentication

That’s it! Now you know how to resolve the ‘AADSTS7000215: Invalid client secret provided’ error.

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