Flow Designer giving error on Run As: System UserIssue When a Flow with (Run As: System User) creates a record in the sys_group_has_role table results in below error on the flow action: Error occurred while inserting record: null On executing the same flow with (Run As: User who Initiates session) no error is received and the flow executes as expected. The flow is configured to Trigger when a record is created on the sys_user_group table. Further, Create Action is used to insert a record in the sys_group_has_role table with values as below: CauseThe issue here is with the role itil (Information Technology Infrastructure Library) which trying to insert in the sys_group_has_role table. In a customer instance, the itil role indirectly has a scope-protected role (itil contains 'sn_templated_snip.template_snippet_reader' and 'sn_templated_snip.template_snippet_writer', which is a scope "Templated Snippets" with application administration turned on). These roles are not a part of itil role in OOB (Out of Box) There is an access handler that will block the addition of these roles, when the user making the insert doesn't have the same roles. In this case the flow is running as System, which doesn't have the scope-protected role ('sn_templated_snip.template_snippet_reader' or 'sn_templated_snip.template_snippet_writer') because of which the issue is happening only for System User and not if we try executing the flow with User who Initiates session.ResolutionThis is an expected behavior with the System User to check the application scope roles. You may try to remove the application scoped roles from the role or try not executing the flow as System User.