Dataverse connection fails after WordPress security keys change
Symptoms
- Dataverse calls fail with Entra authentication errors right after a change to WordPress salts (
AUTH_KEYand related constants). - Errors appear after a site migration or a move to another environment.
- The connection screen still shows the client secret as set.
- Nothing is written to the log, and no admin notice is shown.
Cause
DataPress encrypts the stored client secret with ICDS_AUTH_KEY. If that constant is not defined, it falls back to the first 32 characters of WordPress AUTH_KEY.
When the salts change, the stored secret can no longer be decrypted. The plugin then sends an empty secret, and Entra rejects the request. The cached access token is encrypted with the same key, so it is also unusable, and the failure starts immediately.
ICDS_AUTH_KEY is generated only when the plugin is activated without an existing connection. Plugin updates do not run activation. A site whose connection was saved before version 2.67 may therefore still depend on AUTH_KEY, even on version 2.72 or later.
Fix
- Define
ICDS_AUTH_KEYin Settings → Advanced Settings (see Advanced Settings). - Open the connection settings and type the client secret again. Clicking Save with the masked field does not fix the problem, because the masked value is not the real secret.
- Save the settings and check the connection.
Prevention
- Set
ICDS_AUTH_KEYbefore you connect the plugin to Dataverse, especially before a migration. - Back up
ICDS_AUTH_KEYtogether with the database. Without it, the stored secret cannot be decrypted after a restore. - If you clone a site to staging or production, set
ICDS_AUTH_KEYon the clone and re-enter the secret there.
Some security tools regenerate WordPress salts automatically. For example, Defender can regenerate them on a schedule. If your site does not define ICDS_AUTH_KEY, a regeneration breaks the stored Dataverse credentials and the connection stops working.
Define ICDS_AUTH_KEY before you enable automatic salt regeneration. If the connection fails after a change, see Dataverse connection fails after WordPress security keys change.
The same applies to staging and production clones of a site. Set ICDS_AUTH_KEY on each copy and re-enter the client secret.