Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sf org create user fails with DUPLICATE_COMM_NICKNAME #3142

Closed
epavlic-revenue opened this issue Dec 9, 2024 · 3 comments
Closed

sf org create user fails with DUPLICATE_COMM_NICKNAME #3142

epavlic-revenue opened this issue Dec 9, 2024 · 3 comments
Labels
more information required Issue requires more information or a response from the customer validated Version information for this issue has been validated

Comments

@epavlic-revenue
Copy link

epavlic-revenue commented Dec 9, 2024

Summary

When I run:

  • sf org create user --definition-file config/my-user.json --set-unique-username, and
  • username is specified in the definition file

Then, I get an exception:

DUPLICATE_COMM_NICKNAME, Duplicate Nickname.
Another user has already selected this nickname.
Please select another.: [CommunityNickname]

Setting the CommunityNickname directly also results in the exception

sf org create user --definition-file config/my-user.json --set-unique-username CommunityNickname=some-uuid

Removing the username from the definition file results in successful creation of users.

Steps To Reproduce

  1. Create a definition file with a username set.
  2. Run sf org create user --definition-file config/my-user.json --set-unique-username

Expected result

Create a user with a unique community nickname

Actual result

Throws an exception

Additional information

System Information

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.68.6",
  "nodeVersion": "node-v20.17.0",
  "osVersion": "Darwin 24.1.0",
  "rootPath": "/Users/ipavlic/.nvm/versions/node/v20.17.0/lib/node_modules/@salesforce/cli",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.2.10 (core)",
    "@oclif/plugin-commands 4.1.10 (core)",
    "@oclif/plugin-help 6.2.18 (core)",
    "@oclif/plugin-not-found 3.2.28 (core)",
    "@oclif/plugin-plugins 5.4.17 (core)",
    "@oclif/plugin-search 1.2.16 (core)",
    "@oclif/plugin-update 4.6.13 (core)",
    "@oclif/plugin-version 2.2.16 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.23 (core)",
    "@oclif/plugin-which 3.2.19 (core)",
    "@salesforce/cli 2.68.6 (core)",
    "apex 3.6.3 (core)",
    "api 1.3.2 (core)",
    "auth 3.6.75 (core)",
    "data 3.11.4 (core)",
    "deploy-retrieve 3.15.13 (core)",
    "devops-center 1.2.10 (user) published 213 days ago (Thu May 09 2024) (latest is 1.2.26)",
    "info 3.4.21 (core)",
    "limits 3.3.40 (core)",
    "marketplace 1.3.6 (core)",
    "org 5.2.4 (core)",
    "packaging 2.9.3 (core)",
    "schema 3.3.42 (core)",
    "settings 2.4.6 (core)",
    "sobject 1.4.46 (core)",
    "telemetry 3.6.23 (core)",
    "templates 56.3.30 (core)",
    "trust 3.7.43 (core)",
    "user 3.6.3 (core)"
  ]
}
@epavlic-revenue epavlic-revenue added the investigating We're actively investigating this issue label Dec 9, 2024
@github-actions github-actions bot added the validated Version information for this issue has been validated label Dec 9, 2024
Copy link

github-actions bot commented Dec 9, 2024

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@mdonnalley
Copy link
Contributor

@epavlic-revenue I think the error coming from the server might be misleading here.

The --set-unique-username simply appends the org id to the configured username (e.g. [email protected] -> [email protected]

So if you run sf user create multiple times with the same config, it's going to fail because you're attempting to create a second user with the exact same username as the first

@mdonnalley mdonnalley added more information required Issue requires more information or a response from the customer and removed investigating We're actively investigating this issue labels Dec 9, 2024
@epavlic-revenue
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more information required Issue requires more information or a response from the customer validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

2 participants