I am trying to create users and trying to assign permission sets to them using flow.

Since we get MIXED DML error when we try to do both of these tasks in a single transaction, I tried to use the scheduled paths. I am trying to assign the Id of the User record created in 'Run Immediately' path as AssigneeId in PermissionSetAssignment creation which is under scheduled paths.

But keep on getting 'This error occurred when the flow tried to create records: INVALID_CROSS_REFERENCE_KEY: Invalid assignee ID: {0}.. You can look up ExceptionCode values in the SOAP API Developer Guide'

Note: I have tried assigning userId to a new variable and using in scheduled path. No luck!

Start of the flow

User creation

  • I am also trying to achieve the same. I am creating User in Flow and then in Schedule path taking that user ID in AssignID and assigning the Permission Set. Same error is coming for me. Did you get it resolve? If yes, Please post your soln here, it will be really helpful for me. Thanks
    – user127128
    Jan 20, 2023 at 5:14
  • @user127128 Unfortunately no, I had gone with Apex Jul 14, 2023 at 4:40

1 Answer 1


call a apex action from flow and using future method in apex to assign permission set

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .