User Creation Ambiguous options
Currently trying to prepare for a mass user migration from SFCC login to Account Manager login, and was given this tool. Currently trying to create test users in both environments to see if this tool will work for our needs.
I am running the following(redacted) for both instance and org, but receiving the same error on both: sfcc-ci-win user:create --instance "development-instance" --login "[email protected]" --user '{"firstName":"Daniel", "lastName":"Testing"}'
sfcc-ci-win user:create --org "org" --login "mylogin" --user '{"email":"[email protected]","first_name":"Daniel", "last_name":"Testing"}'
Error: Error: Ambiguous options. Pass either -o,--org or -i,--instance.
Anyone know what the issue is, or if there is a workaround/fix?
Hi, i am facing the same issue. whats the fix please?
Please note, that there is a difference in the way how the user details are provided (via the JSON). There is a difference in the property naming, depending on whether you create a user in Account Manager (sfcc-ci user:create with --org and without --instance) or you create a user in a B2C Commerce instance (sfcc-ci user:create without --org and with --instance).
The Account Manager user details must be provided with property names in camelCase, whereas for B2C Commerce instance user details must be provided with property names in snake_case).
Eg.
sfcc-ci-win user:create --org "org" --login "mylogin" --user '{"email":"[email protected]","first_name":"Daniel", "last_name":"Testing"}'
is wrong. It must be:
sfcc-ci-win user:create --org "org" --login [email protected] --user '{"firstName":"Daniel", "lastName":"Testing"}'
whereas
sfcc-ci-win user:create --instance "development-instance" --login "[email protected]" --user '{"firstName":"Daniel", "lastName":"Testing"}'
is wrong as well. It must be:
sfcc-ci-win user:create --instance "development-instance" --login "[email protected]" --user '{"first_name":"Daniel", "last_name":"Testing"}'
@tobiaslohr Thanks for the clarification, but I am still receiving the 'Error: Ambiguous options. Pass either -o,--org or -i,--instance.' error even with the correct naming formats.
Update for all.. I have gotten this to work on the MacOS version, but not the windows version, so this may be a bug with the windows specific version
Which exact command is not working with the windows version? Can you paste the command here please?
Hi Tobias, This issue was resolved. Thanks Regards, Suhel
On Thu, May 27, 2021 at 11:28 AM Tobias Lohr @.***> wrote:
Which exact command is not working with the windows version? Can you paste the command here please?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SalesforceCommerceCloud/sfcc-ci/issues/205#issuecomment-849520932, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4YX5JECFLSVTFYCWFUUC3TPYNDNANCNFSM4Y34ISPQ .
HI @suhel1612, thanks and glad you've solved it! For the sake of sharing with other community members, can you let us know, who you've solved the issue finally?
Which exact command is not working with the windows version? Can you paste the command here please?
sfcc-ci-win user:create --org org2 -l [email protected] --user '{"firstName":"Daniel", "lastName":"Testing","roles":["bm-user"]}' Error: Ambiguous options. Pass either -o,--org or -i,--instance.
In the On demand sandbox, new users have to be created through the Account Manager.
Regards, SP
On Thu, May 27, 2021 at 3:34 PM drodriguez-crocs @.***> wrote:
Which exact command is not working with the windows version? Can you paste the command here please?
sfcc-ci-win user:create --org org2 -l @.*** --user '{"firstName":"Daniel", "lastName":"Testing","roles":["bm-user"]}' Error: Ambiguous options. Pass either -o,--org or -i,--instance.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SalesforceCommerceCloud/sfcc-ci/issues/205#issuecomment-849686722, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4YX5LMDZJ42Y72IWIU76DTPZJ6PANCNFSM4Y34ISPQ .
@drodriguez-crocs The error message Error: Ambiguous options. Pass either -o,--org or -i,--instance. is only printed if:
- --org AND --instance are not passed or
- --org AND --instance are passed
as you are passing --org, it may be that --instance (although not being passed explicitly) is being looked up via a configured default instance (from previous commands).
Can you please check if a default instance is set? You can di this by running sfcc-ci instance:list (look for "Default Instance") in the output.
If there is a default instance being set, then we should fix the sfcc-ci user:create command to only accept --instance being passed explicitly.
@tobiaslohr It does not appear that there is a default instance set when running instance:list Default Instance │ (not set)
@drodriguez-crocs Thanks for confirming! And just to double check, you are still receiving the same error, when executing:
sfcc-ci-win user:create --org org2 -l [email protected] --user '{"firstName":"Daniel", "lastName":"Testing","roles":["bm-user"]}'
?
@tobiaslohr That is correct, I am still receiving the error when running your command with the correct org name and ID.
@drodriguez-crocs can you run the command in debug mode and (not put the output here!) check if you see the value for --org being properly passed and processed?
@drodriguez-crocs is this issue still happening / relevant or can we close it?
@drodriguez-crocs Quick checkin: were you able to resolve this and can we close this ticket?