Overview
When importing an exported configuration into a tenant using the Deploy CLI, the following error occurs:
Problem running command import during stage processChanges when processing type emailProvider
Payload validation error: ‘None of the valid schemas were met’ on property credentials (Credentials required to use the provider). Inner errors: [ Payload validation error: ‘Missing required property: api_key’ on property credentials. (also) Payload validation error: ‘Too few properties defined (0), minimum 1’ on property credentials. ].
Applies To
- Deploy CLI
Cause
The error is indicative of the credentials object in your imported files being empty. This can occur because the Management API will not provide stored credentials on GET requests for security reasons, and thus the exported file will have in the email provider configuration:
credentials: {}
Solution
To avoid the error from occurring there may be a few options:
-
Exclude the Email provider for Imports:
E.g.
{
"AUTH0_DOMAIN": "example-site.us.auth0.com",
"AUTH0_CLIENT_ID": "<YOUR_AUTH0_CLIENT_ID>",
"AUTH0_EXCLUDED": ["emailProvider"]
}
-
To preserve the target tenant’s current settings, remove the credentials line (or the entire email provider configuration) from the import files.
-
To update the credentials or use different credentials for different environments, update the import file so the credentials object contains the value relevant to an email provider. The values each provider will need for the credentials object can be seen here:
If using an Office 365 email provider, the schema is missing from the above link; until this is updated, here is an example using the directory format in “provider.json”:
{
"enabled": true,
"name": "ms365",
"default_from_address": "<YOUR_DEFAULT_FROM_EMAIL_ADDRESS>",
"credentials":{
"tenantId":"<YOUR_TENANTID>",
"clientId":"<YOUR_CLIENTID>",
"clientSecret":"<YOUR_CLIENTSECRET"
}
}