+ Start a Discussion
bjohnston73bjohnston73 

Adding multiple existing users for new permission set

When I am on the permission set page, the 'New User' and 'Add Multiple Users' button is for adding physically new users...I want to add users to the permission set.   In otherwords, I don't want to navigate to 500 different users adding a permission set one at a time.

 

I thought maybe I could do it through the meta-data in Eclipse, but alas only the permission set is present, not what users the permission set is tied to...

matermortsmatermorts

There's an object called PermissionSetAssignment. Looks like you can data load to this object (insert using the Apex Dataloader). The only two fields in that object are AssigneeId and PermissionSetId. I haven't tried this but it looks pretty simple.

 

Also, I notice this object is visible in API version 23, but it's not visible in version 19. I don't know if it's visible in versions 20-22, but if you have data loader running on version 23, you should be good to go.

 

Let us know if this works.

matermortsmatermorts

I just did a real quick test, just assigning one permission set to one user, by doing an insert through the data loader. It worked beautifully. Let me know how it goes for you.

TonnisthaSrkTonnisthaSrk

Thanks  matermorts its helpful..

s@g.ax801s@g.ax801
Thanks for this nice solution

 

RadramRadram

Hello Matermots.

 

I have a similar issue and I'm unable to find PermissionSetAssignment object in my Org. Could you please help me on this.

 

Thanks.

 

Radram

matermortsmatermorts

As far as I'm aware, you can only see it through the Apex Data Loader, and even in there, you have to select the "Show all Salesforce objects" checkbox to be able to see it.

 

I think you need the data loader that is running on API version 23 or later.

 

To get the most recent version of the data loader, go to Setup > Administration Setup > Data Management > Data Loader. I'm looking at it in version 25.0.2 and the object is there.

RadramRadram

That helped. Thanks a lot.. !!!

RadramRadram

Hello Matermorts,

 

Is there an easy way to remove the Permission set for all the users?

 

Thanks

 

Radram

matermortsmatermorts

I haven't tried it, but I think you could just perform a delete operation through the data loader, deleting the respective PermissionSetAssignment records. Obviously, do this in a sandbox if you can, before production.

RadramRadram

Thank you.