1

I'm trying to create users on the fly via SOAP to my Dev org. I'm able create them and see them in setup. I set a role in addition to calling setUserPassword.

I'm setting the following fields in my SOAP request.

  • callCenterId
  • alias
  • email
  • firstName
  • lastName
  • emailEncoding
  • userPreferencesLightningExperiencePreferred
  • userPreferencesPreviewLightning
  • userPreferencesHideLightningMigrationModal
  • languageLocaleKey
  • localSidKey
  • Standard User profile via profileId
  • timeZoneSidKey
  • userName
  • userRoleId
  • isActive

I'm not able to log the user in reliably thru the UI, just that the username/password were incorrect. Is there some sort of governor that controls the users from logging in right after creation? It looks like there was a wait period of 10 minutes after creation before I could logon. I looked at the logs and there was no record of the logon attempt between the call to create the user and when the user could logon.

It seemed to work after saving the user in setup again (occasionally). Is there some property that I'm not setting?

5
  • 2
    Please read How do I ask a good question. Without seeing your code, how would any of us know what properties you've been setting to begin with?
    – crmprogdev
    Commented Mar 23, 2017 at 21:44
  • Can you clarify the reliability issue. Are you trying to do an API login() call, or are you using the standard Salesforce login UI? Is there a specific error message that is returned when the login fails? The inconsistency of the problem suggests there might be something else going on. What does the "Login History" under the setup pages show when the login attempt fails? Commented Mar 24, 2017 at 7:14
  • @DanielBallinger i think i figured it out. i was logging in to www instead of where my org is hosted. i'm guessing there's some sort of background process that handles it.. can someone open this so i can answer my own question? Commented Mar 27, 2017 at 0:14
  • @DanielA.White You should be using login.salesforce.com for production and developer edition orgs. For Sandboxes use test.salesforce.com. These will redirect you to the correct pod/instance where your org is hosted. Commented Mar 27, 2017 at 0:23
  • yea i'm guessing theres a replication that doesn't happen right away after creating a new user. @DanielBallinger Commented Mar 27, 2017 at 0:24

1 Answer 1

0

I found if I changed the login URL to the domain specific to my org, instead of using the generic login URL, I was able to login right away. I'm guessing there is a process that replicates the users to the generic login hosts.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .