continious if one account has been activated, no need stop
Opened this issue · 0 comments
ozbillwang commented
Welcome
- Yes, I've searched similar issues on GitHub and didn't find any.
Description of the problem
I have several groups to be activated, when use the option --prefix
, it stopped in the middle
$ az-pim-cli activate group --prefix "User"
2024/09/11 11:37:15 Activating role 'Member' for group 'User-abc-1234' with reason 'config'
2024/09/11 11:37:33 The upstream API responded with status 400 Bad Request: {"error":{"code":"RoleAssignmentExists","message":"The Role assignment already exists."}}
Could we ignore the error, and move on the next group?
Currently I have to list all groups, then feed the command az-pim-cli activate group -n $group || echo ok
in a for loop
Version of az-pim-cli
$ az-pim-cli version
az-pim-cli version (devel) (built with go1.22.4 from (e6d96fc864f0b8cb5bad5d53cceb6fa094937cd7, modified: false, mod sum: "") on 2024-07-01T13:58:57Z)
Configuration
$ export PIM_TOKEN=xxxx
$ az-pim-cli activate group --prefix "User"
Go environment
$ go version && go env
# paste output here
Output of command
# paste output here
# make sure to sensor any confidential output
Validation
- Yes, I've included all information above (version, config, etc.).