Troubleshoot an Authentication Provider User Registration Flow
When you use a flow for authentication provider user registration, there are some errors that are revealed only when you run the flow. Learn how to update your flow based on execution errors.
Required Editions
| Available in: Lightning Experience and Salesforce Classic |
| Available in: Enterprise, Performance, Unlimited, and Developer Editions |
After you configure a flow for user registration, always test your flow extensively to confirm that it creates and updates users as expected. To test your flow, log in as a new user and as an existing user. After you authenticate with the identity provider, Salesforce redirects your browser. If there's an error executing the flow, the UI displays an error message. You can also find the error message in the URL.
These are some common error scenarios that you can encounter. These descriptions use variables names from the Authentication Provider User Registration template, which can be different from your flow if you renamed variables.
| Error Message | Error Cause | Resolution |
|---|---|---|
| ERROR_EXECUTING_FLOW: User ID output variable does not match user ID from TPAL | If the flow assigns the user ID for a linked user (a user with a ThirdPartyAccountLink) to an output variable, you get this error if the user ID doesn't match the user's ID from the ThirdPartyAccountLink. | Check any actions that assign the user ID to an output variable for a linked user. Set the existingUserIdFromTpal as the value of the userIdOutput variable. |
| ERROR_EXECUTING_FLOW: Permission set not found | When trying to add or remove a permission set, the flow wasn't able to find the permission set API name. | Check any assignments that add or remove permission sets. Check the permission set names as specified in your flow and compare them to the API names for permission sets that are specified in your org. Update the API names or create permission sets as necessary. |
| ERROR_EXECUTING_FLOW: Cannot remove permission set from new user | The assignment element to manage permission sets for a new user includes one or more permissionSetsToRemove variables. | Check any assignments that assign permission sets to a new user. Make sure that these assignments don't reference permissionSetsToRemove. |
| ERROR_EXECUTING_FLOW: Could not add permission set | There was an unknown error when adding the permission set to a new user. This error can sometimes happen when the permission set is associated with a specific license that the user doesn't have. | Check the user profile and permission set and confirm that the licenses match. Try running the flow again. Try creating and referencing different permission sets in your assignment elements. If you get stuck, contact Salesforce Customer Support. |
| ERROR_EXECUTING_FLOW: Execution user cannot run flow | The execution user specified in the authentication provider definition doesn't have permission to manage the flow. | Check the authentication provider definition and make sure that the execution user specified there has the Manage Users permission. |

