Skip to main content

Resolving Authentication Issues in salesforce after Sandbox Refresh

This KBA explains how to resolve authentication issues in SF after Sandbox refresh

After refreshing a sandbox tenant, clients may face authentication issues when attempting to authenticate in salesforce and redirect to the Fen-X app. An error message, such as "You are not permitted to view this message," may appear. This article outlines the steps to troubleshoot and resolve the issue by addressing configuration mismatches.

Cause of the Issue:

The issue arises due to a mismatch in configuration settings after the environment refresh. Some of the configuration settings may have been removed or replaced during the refresh, leading to incorrect connections between Salesforce and Fen-X. Below are the key areas where configuration might need attention:

  1. Certificate Label

  2. Auth Providers

  3. Custom Metadata Types

  4. Identity Provider

  5. Consumer Key and Secret

  6. Webhook Settings

Troubleshooting Steps:

  1. Check the Certificate Label:

    • The Certificate Label may not have been updated correctly after the refresh. Ensure that the certificate label is aligned with the configuration and is correctly set.

    • Action: Confirm whether the certificate label has been updated as expected. If not, update it to match the required configuration.

  2. Validate Named Credential Authentication:

    • In the provided screenshot, the status of the named credential was shown as "Pending." The named credential must be authenticated for the system to connect to Fen-X.

    • Action: Ensure the box to trigger the authentication flow is checked. Authenticate against Fen-X to resolve the issue.

  3. Verify Consumer Key and Secret:

    • After the sandbox refresh, the Consumer Key and Secret configuration may have been removed or replaced. This mismatch can cause authentication failures.

    • Action: Verify that the Consumer Key and Secret match the configuration provided by Fen-X. If the credentials were removed, re-enter the correct values.

  4. Compare Pre- and Post-Refresh Configurations:

    • Before the refresh, the connection between Salesforce Sandbox and Fen-X Sandbox was functioning correctly. After the refresh, the Salesforce Sandbox was pointed to a different Fen-X instance or org.

    • Action: Revert the configuration changes and point the Salesforce Sandbox to the correct Fen-X instance.

Additional Configuration Steps:

When an environment is refreshed, certain configurations may remain intact while others are reset or modified. Based on the investigation, the following configurations should be reviewed and potentially reconfigured:

  1. Certificate: Ensure the certificate label is correctly set after the refresh.

  2. Auth Providers: Review the authentication provider configuration and make sure it points to the correct Fen-X instance.

  3. Custom Metadata Types: Check the custom metadata settings for any changes, particularly the Webhook ID.

  4. Identity Provider: Confirm that the identity provider settings have not been altered during the refresh.

Known Issues Identified:

  • Consumer Secret Update: After reviewing the authentication provider configuration, it was discovered that the consumer secret was updated with the tenant ID, which could be incorrect. A request for a new secret has been made to the CBO team. Once the new secret is obtained, authentication should be retried.

  • Webhook Disabled in Fen-X Dev Tenant: The webhook was found to be disabled in the Fen-X Dev tenant.

    • Action: The webhook has now been successfully enabled. However, verify that the Webhook ID is correctly set in the custom metadata after the refresh. If the Webhook ID has been updated or changed, it needs to be corrected to point to the appropriate Fen-X environment.

Next Steps:

  1. Verify all configuration settings as mentioned above.

  2. Authenticate again once the necessary changes are made.

  3. If the issue persists, schedule a call to review the configuration in more detail.

  4. If the issue is resolved, ensure that all environment refreshes in the future are carefully monitored to prevent similar issues.

Did this answer your question?