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 generate password does not work on behalf of other users #2506

Closed
petter-eikeland opened this issue Oct 3, 2023 · 4 comments
Closed
Labels
bug Issue or pull request that identifies or fixes a bug documentation Issue or pull request to update or fix documentation validated Version information for this issue has been validated

Comments

@petter-eikeland
Copy link

petter-eikeland commented Oct 3, 2023

Summary

When trying to generate a password on behalf of another user than User User, you are blocked when you haven't authorized the scratch org for that username.

Steps To Reproduce

  1. Create a scratch org, test-password-generate
  2. Create a new User in the scratch org with username test.user@test.no.1696293073599
  3. Execute sf org generate password -o test-password-generate -b "test.user@test.no.1696293073599"

Expected result

A new password is generated for the new User (test.user@test.no.1696293073599)

Actual result

Error thrown: No authorization information found for test.user@test.no.1696293073599

System Information

{
  "cliVersion": "@salesforce/cli/2.11.8",
  "architecture": "darwin-arm64",
  "nodeVersion": "node-v18.15.0",
  "osVersion": "Darwin 22.6.0",
  "shell": "zsh",
  "rootPath": "/Users/user/.local/share/sf/client/2.11.8-c9872b8",
  "pluginVersions": [
    "@eon-com/eon-sfdx 1.13.3 (user)",
    "@oclif/plugin-autocomplete 2.3.8 (core)",
    "@oclif/plugin-commands 2.2.26 (core)",
    "@oclif/plugin-help 5.2.19 (core)",
    "@oclif/plugin-not-found 2.4.1 (core)",
    "@oclif/plugin-plugins 3.8.2 (core)",
    "@oclif/plugin-search 0.0.22 (core)",
    "@oclif/plugin-update 3.2.3 (core)",
    "@oclif/plugin-version 1.3.10 (core)",
    "@oclif/plugin-warn-if-update-available 2.1.0 (core)",
    "@oclif/plugin-which 2.2.32 (core)",
    "@salesforce/cli 2.11.8 (core)",
    "1commerce 0.0.10 (user)",
    "apex 2.3.15 (core)",
    "auth 2.8.17 (core)",
    "community 2.4.4 (user)",
    "data 2.5.12 (core)",
    "deploy-retrieve 1.18.3 (core)",
    "functions 1.22.3 (user)",
    "info 2.6.45 (core)",
    "limits 2.3.35 (core)",
    "login 1.2.31 (core)",
    "marketplace 0.2.2 (core)",
    "org 2.10.8 (core)",
    "packaging 1.26.1 (user)",
    "schema 2.3.28 (core)",
    "settings 1.4.30 (core)",
    "signups 1.5.1 (user)",
    "sobject 0.2.7 (core)",
    "source 2.10.36 (core)",
    "telemetry 2.3.4 (core)",
    "templates 55.5.13 (core)",
    "trust 2.6.15 (core)",
    "user 2.3.32 (core)",
    "sfdmu 4.30.0 (user)"
  ]
}

Additional information

@petter-eikeland petter-eikeland added the investigating We're actively investigating this issue label Oct 3, 2023
@github-actions github-actions bot added the validated Version information for this issue has been validated label Oct 3, 2023
@github-actions
Copy link

github-actions bot commented Oct 3, 2023

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.

@iowillhoit
Copy link
Contributor

The sf org generate password needs a local auth file for that user to be able to generate a password. These get created in your ~/.sfdx directory. If you create a user in the Salesforce UI, you will not have that auth file locally.

If you want to be able to generate a password on behalf of another user, you'll need to first create that user locally with sf org create user. See the --help on that command for more information.

After you've created the user locally, you will be able to run sf org generate password -b the-user@example.com to generate a password for that user.

I will create a ticket to update the help docs to make this more clear, thanks!

@iowillhoit iowillhoit added bug Issue or pull request that identifies or fixes a bug and removed investigating We're actively investigating this issue labels Oct 5, 2023
@git2gus
Copy link

git2gus bot commented Oct 5, 2023

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

@iowillhoit iowillhoit added the documentation Issue or pull request to update or fix documentation label Oct 6, 2023
@jshackell-sfdc
Copy link
Collaborator

This issue is fixed in version 2.13.9 (Oct 18, 2023) of Salesforce CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug documentation Issue or pull request to update or fix documentation validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

3 participants