Visual Workflow – Which Context Do Record-Triggered Flows Run In?

contextcustom-permissionexecutioncontextpermission-setsvisual-workflow

According to the table in the middle of this Salesforce documentation, record-triggered Flows run in system-context. At the bottom of this unofficial sf documentation, it says record-triggered Flows run in user-context. I've performed testing in our org and at least one of our record-triggered Flows is running in user-context (see EDIT for details). What context do record-triggered flows run in?

I'm trying to determine which user(s) to assign a permission set to so that the Flow doesn't trigger a validation error when a record is updated.

EDIT:
A validation rule exists on the Account object. It checks for a custom permission and if the user doesn't have the custom permission, it throws an error. I logged in as a user without the custom permission and updated the Account which fired the record-triggered flow to update a field. The validation rule worked and prevented the update. I then assigned a perm set with the custom permission to the user and performed the previous steps again and the account updated successfully without triggering the validation rule. This seems to indicate that the record-triggered flow is in user-context.

Best Answer

Explicit checking in validation rules for custom permissions does not mean the flow is running in user mode; such validation rules are always run and when they reference contextual user-related metadata always use that metadata (such as your custom permission).

User mode would mean that the flow could not access fields, objects or records the user doesn't have CRUD/FLS or sharing access to, but that's not what happens with record triggered flows; these can access all objects, fields and records.

As per this Q&A and the related official documentation, all record triggered flows run in System mode, without sharing.