+ Start a Discussion
Christopher PickingChristopher Picking 

Automatically assign a permission set upon new user creation

I'm looking for the best way to accomplish assigning a permmision set when a new user is created without me having to manually do it. I'd like to do this via flow/process builder but I'm not having luck with that. Anyone have any insite or suggestions on how to do this task?
James LoghryJames Loghry
I'm not 100% sure if this will work, but it looks like you can create a PermissionSetAssignment record (https://www.salesforce.com/developer/docs/api/Content/sforce_api_objects_permissionsetassignment.htm).  So what you should be able to do is use a trigger, or perhaps an invocable method fired through a flow / process to create the PermissionSetAssignment record and assign it your new user's Id.
Varun PareekVarun Pareek
As James suggested, you would have to create a PermissionSetAssignment record via a trigger on the User object.

Alternatively, you can also data load the PermissionSetAssignment object.
Collet LudovicCollet Ludovic

To achieve that, a solution would be to use process builder or workflow + flow.


SFDC Prime SquadSFDC Prime Squad
Hi Christopher,
You can try flow or data loader approach here. Please let us know if you are facing any issue.
Nagashree Vasavi KuchimanchiNagashree Vasavi Kuchimanchi
@SFDC Prime Squad,
I have tried flow approach here to auto assign the permission set assignement to new users. But I am getting the below error message.

Error element myWait_myRule_1 (WaitInfo).
common.exception.SfdcSqlException: ORA-20003: ORA-06512: at "BASHFUL.CSTORAGELIMIT", line 262 ORA-06512: at "BASHFUL.CSTORAGELIMIT", line 744 ORA-06512: at "BASHFUL.CSTORAGELIMIT", line 797 ORA-06512: at "BASHFUL.CSAVEUTILS", line 429 ORA-06512: at "BASHFUL.CSTANDARDENTITYDATATEMPLATE", line 2101 ORA-06512: at line 1 {call cStandardEntityDataTemplate.insert_stdentdatas(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)} {call cStandardEntityDataTemplate.insert_stdentdatas(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}