cli icon indicating copy to clipboard operation
cli copied to clipboard

Improve sfdx force:user:permset:assign to accept Permission Set Groups

Open AllanOricil opened this issue 4 years ago • 7 comments

Is your feature request related to a problem? Please describe. No

What are you trying to do Assign permission set groups using sfdx force:user:permset:assign

Describe the solution you'd like Improve sfdx force:user:permset:assign to accept permission set groups, or create a new command or flag

Describe alternatives you've considered I can pass a list of permission sets to the current command

Additional context N/A

AllanOricil avatar Jun 25 '21 01:06 AllanOricil

This issue has been linked to a new work item: W-9517915

uip-robot-zz avatar Jun 25 '21 01:06 uip-robot-zz

Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments.

github-actions[bot] avatar Jun 25 '21 01:06 github-actions[bot]

Unfortunately the work item requires a salesforce employee login to view.

Can you let us know the status of this?

I'm working in a devbox designing a brand new implementation of our org. One of our best practices is for the 95% usage cases, assign permission groups to users, not permission sets. I'm trying to create a few hundred inactive users to test out our territory structure. Is there a way with the tool yet to do this? Or do I have to do something more tranditional like a workbench csv file load.

I would prefer to use the sfdx type solution, as my script could be reusable for scratch orgs and such in the future.

docbill avatar Apr 06 '22 18:04 docbill

Obviously you'd want a brand new flag. As a permission set, and permission group may have the same name.

docbill avatar Apr 06 '22 18:04 docbill

It appears you can pass a permission set group name to force:user:permset:assign and it just works. I just did so with sfdx-cli 7.146.1.

mkhokhlov avatar Aug 03 '22 19:08 mkhokhlov

Maybe they have implemented it already. Good to know. Thanks for sharing

AllanOricil avatar Aug 04 '22 23:08 AllanOricil

It appears you can pass a permission set group name to force:user:permset:assign and it just works. I just did so with sfdx-cli 7.146.1.

Hrmm.. I get an error if I specify a permission set group name.

I'm using sfdx-cli/7.166.1 darwin-x64 node-v16.17.0

$ sfdx force:user:permset:assign -u [email protected] -n PermSetGroupName

=== Failures

 Username         Error Message                                             
 ──────────────── ───────────────────────────────────────────────────────── 
 [email protected] entity type cannot be inserted: Permission Set Assignment 

douglascayers avatar Sep 08 '22 21:09 douglascayers

Screenshot_20221202_195647

AllanOricil avatar Dec 02 '22 22:12 AllanOricil

Hey everyone, just chiming in here to say that this should be possible.

We just ran a quick test by creating a new permission set group and passing it into sfdx force:user:permset:assign -n <permsetGroup> and it worked just fine.

This was on version 7.179.0 of sfdx.

@AllanOricil if you can give us more info about what you're seeing maybe we can figure out if there's a bug or something else going on.

RodEsp avatar Dec 07 '22 18:12 RodEsp

Hey everyone, just chiming in here to say that this should be possible.

We just ran a quick test by creating a new permission set group and passing it into sfdx force:user:permset:assign -n <permsetGroup> and it worked just fine.

This was on version 7.179.0 of sfdx.

@AllanOricil if you can give us more info about what you're seeing maybe we can figure out if there's a bug or something else going on.

@RodEsp I actually did not test it again. But If you say it works, I belive in you 👍

AllanOricil avatar Dec 07 '22 19:12 AllanOricil

Confirmed, the CLI supports assigning users to permission set groups and permission sets. I last tried several weeks ago and it wasn't working but seems to be working now. Thanks!

sfdx-cli/7.179.0 darwin-x64 node-v18.12.1

douglascayers avatar Dec 07 '22 19:12 douglascayers