When Setting Up SharePoint 2019 SMTP Authentication, “Couldn’t store the SMTP password. The application credential key wasn’t found on the local server or there was an encryption error.” Error and Solution

Yunus Emre Araç
2 min readMay 9, 2023

--

Referance: https://www.yunusemrearac.com/2023/03/04/sharepoint-2019-smtp-authentication-ayarlarken-alinan-couldnt-store-the-smtp-password-the-application-credential-key-wasnt-found-on-the-local-server-or-there-was-an-encryption-error-hatasi-v/

Hello friends, today, when using the SMTP Authentication feature that came with SharePoint 2019, the “Couldn’t store the SMTP password. The application credential key wasn’t found on the local server or there was an encryption error.” I will talk about the error and the solution of this error.

You know, when you set up outgoing e-mail in versions before sharepoint 2019, the stmp information you enter here and your e-mail address must have the “SMTP Relay” feature turned on, that is, it must be able to send without a password. mail via e-mail address.

With Sharepoint 2019, we can now set up smtp authentication and configure configuration settings without the need for the relay feature.

When you come to the Outgoing Email setting on the Sharepoint Central Admin side, a field like the one above will appear. Here, you can use the username and password to login to your smtp server, or you can choose the old method and continue in the same way.

However, before storing the password, SMTP authentication requires an application credential key on each SharePoint server in the farm. If the key is not set before trying to set the authentication, the following error occurs.

To set the application credential key, you need to run the following command on each SharePoint server. Where it says “application credential key” is the password to be used to encrypt and decrypt the SMTP password.

$key = ConvertTo-SecureString -AsPlainText -Force "application credential key"
Set-SPApplicationCredentialKey $key

You must run the command on each SharePoint server in the farm using the same application credential key.

If you made a mistake in this definition or you want to delete it, you can delete it using the command below.

Remove-SPApplicationCredentialKey

If you run the above processes on each sharepoint server without any problems, you can configure the smtp configuration in the outgoing email settings without encountering any errors while making the adjustment.

--

--

Yunus Emre Araç

Technology Product Manager of Corporate Applications at ING | Old Microsoft Student Partners Lead | İnönü Üniv. Bilg. Müh. | İAU Bilg. Müh. Tezli Yüksek Lisans