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

sfdx force:user:password:generate - The requested Resource does not exit API 51.0 #798

Closed
AllanOricil opened this issue Jan 14, 2021 · 12 comments
Assignees
Labels
bug Issue or pull request that identifies or fixes a bug

Comments

@AllanOricil
Copy link

AllanOricil commented Jan 14, 2021

Summary

Can't use sfdx force:user:password:generate with API 51.0

image

When changing to API 50.0 it works

image

Steps To Reproduce:

1 - Set sfdx api to 51.0
2 - try to generate user password for a Scratch Org
3 - Set api to 50.0
4 - run the command again
5 - Check it worked

Expected result

Should create the password

Actual result

It says the resource does not exist

Additional information

image

OS and version: Windows 10

@AllanOricil AllanOricil added the investigating We're actively investigating this issue label Jan 14, 2021
@AllanOricil AllanOricil changed the title Sfdx force:user:password:generate - The requested Resource does not exit API 51.0 sfdx force:user:password:generate - The requested Resource does not exit API 51.0 Jan 14, 2021
@github-actions
Copy link

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.

@amphro
Copy link
Contributor

amphro commented Jan 14, 2021

What version is your instance?

@AllanOricil
Copy link
Author

@amphro The instance is CS96

image

@WillieRuemmele WillieRuemmele self-assigned this Jan 20, 2021
@WillieRuemmele WillieRuemmele added bug Issue or pull request that identifies or fixes a bug and removed investigating We're actively investigating this issue labels Jan 20, 2021
@git2gus
Copy link

git2gus bot commented Jan 20, 2021

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

@WillieRuemmele WillieRuemmele added bug Issue or pull request that identifies or fixes a bug and removed bug Issue or pull request that identifies or fixes a bug labels Jan 21, 2021
@mshanemc
Copy link
Contributor

@AllanOricil are you able to see the password policies in your org, specifically whether Allow use of setPassword() API for self-resets is checked or unchecked?
https://developer.salesforce.com/docs/atlas.en-us.securityImplGuide.meta/securityImplGuide/admin_password.htm

This setting can't be re-enabled via ui or config/mdapi if it's disabled because v51 of the mdapi deprecates the setting. https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_securitysettings.htm

@mshanemc
Copy link
Contributor

I have an update on this.

This is no longer going to work in v51/Spring21

"securitySettings": {
   "passwordPolicies": {
      "enableSetPasswordInApi": true
   }
}

It's now moved to the Features section [only available on scratch orgs]

"features": ["EnableSetPasswordInApi", ....],

@mshanemc
Copy link
Contributor

@AllanOricil can you try your org again using the updated scratchDef to make sure it's working?

@AllanOricil
Copy link
Author

@mshanemc I was gonna try it, but I can't even update sfdx

image

@AllanOricil
Copy link
Author

@mshanemc it actually updated, but it threw that error message

image

@AllanOricil
Copy link
Author

Ok, after updating sfdx to 7.84.2, I first configured SFDX to use apiVersion=51.0, then I tried to create a SO with the following configs:

{
  "orgName": "Demo company",
  "edition": "Developer",
  "release": "Preview",
  "features": [
    "Communities", 
    "ContactsToMultipleAccounts",
    "DebugApex",
    "EnableSetPasswordInApi"
  ],
  "settings": {
    "languageSettings": {
      "enableTranslationWorkbench":  true,
      "enableEndUserLanguages": true
    },
    "lightningExperienceSettings": {
      "enableS1DesktopEnabled": true
    },
    "mobileSettings": {
      "enableS1EncryptedStoragePref2": false
    },
    "communitiesSettings": {
      "enableNetworksEnabled": true
    },
    "orgPreferenceSettings": {
      "s1DesktopEnabled": true
    }
  }
}

But I got this error

image

@AllanOricil
Copy link
Author

AllanOricil commented Jan 27, 2021

@mshanemc after changing to apiVersion=50.0 the SO was created with no problem and I was, again, able to generate the password

image

The problem now is that I can't even create a SO using API v51.0. Before I was able to do it and the only part that was failing was the password generation.

@mshanemc
Copy link
Contributor

This was fixed and shipped. Re-open or open a new issue if you're still seeing it.

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
Projects
None yet
Development

No branches or pull requests

4 participants