Debug Flow Errors in Sandbox Org as Another User

Debugging a flow in a sandbox org is easier now because you can debug that flow as another user. Test a flow by “impersonating” a user, without logging in as that user. Troubleshoot a flow by seeing the flow’s debug log exactly as a specified user sees it. Catch flow exceptions such as unexpected permission, sharing, and profile configurations—before they occur in production orgs.

Where: This change applies to Lightning Experience and Salesforce Classic in Essentials, Professional, Enterprise, Performance, Unlimited, and Developer editions.

Who: To enable this feature, you must have the Modify All Data, Manage Users, and Customize Application permissions. To use this feature after it’s enabled, you need the Manage Flows and View All Data permissions.

How: In Setup, go to Process Automation Settings and select the Let admins debug flows as other users checkbox.

The Let admins debug flows as other users checkbox in Process Automation Settings.

Next open a flow in Flow Builder and click Debug. Select the Run flow as another user checkbox, and choose a user to impersonate.

The Debug the flow modal, with the Run flow as another user checkbox selected.

The flow debug run then starts with you as the impersonated user. Review the debug details.

The Debug Details modal, showing one user starting a flow interview and the different name of the running or impersonated user.

Debugging a flow as another user is available only for screen flows and autolaunched flows in nonproduction orgs. This feature supports flow elements and actions only. Any operations performed by screen components are performed as the logged-in user and not as the impersonated user. These screen components include custom Aura components, custom Lightning web components, and some standard flow screen components such as Lookup components.