Create user API error on duplicate login

I’m using the java client to call the API to create users. I’m getting a 400 response:

Field error in object ‘newUser’ on field ‘login’: rejected value []; codes [notUniqueWithinOrg.newUser.login,notUniqueWithinOrg.login,,notUniqueWithinOrg]; arguments ; default message [null] - login: An object with this field already exists in the current organization)

However, I am NOT using a duplicate login, I am using a duplicate email address. I have changed the login field so it does not require an email address, as we do not use email addresses as our login id’s.
I have successfully import users from ldap with duplicate emails and different logins before. How can I use the api to do the same?

If you try to create a user with the same details (login, email, first name, etc) are you able to do so via a manual API call? Do you happen to have Self-Service Registration enabled in your Okta org?

I tried this again and it is working now. I must have had a bug in my code. Thanks for responding.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.