Skip to content

Replace an existing identity source user

Request

OAuth 2.0 scope:
  • okta.identitySources.manage

Replaces an existing user for the given identity source instance and external ID

Path
identitySourceIdstringrequired

The ID of the identity source for which the session is created

Example:0oa3l6l6WK6h0R0QW0g4
externalIdstringrequired

The external ID of the user

Example:00u7m9p9ZT8k2S2EX1f7
Bodyapplication/json
externalIdstring, <= 512 characters

The external ID of the user in the identity source

profileobject(IdentitySourceUserProfileForUpsertRequired)

Contains a set of external user attributes and their values that are mapped to Okta standard and custom profile properties. See the profile object and Declaration of a Custom Identity Source Schema in Using anything as a source.

Note: Profile attributes can only be of the string type.

curl -i -X PUT \
  https://subdomain.okta.com/api/v1/identity-sources/0oa3l6l6WK6h0R0QW0g4/users/00u7m9p9ZT8k2S2EX1f7 \
  -H 'Content-Type: application/json' \
  -d '{
    "profile": {
      "firstName": "Emily",
      "lastName": "Brock",
      "email": "brockly@email.com",
      "userName": "brockly@email.com"
    }
  }'

Responses

Success

Bodyapplication/json
createdstring, (date-time)read-only

The timestamp when the user was created in the identity source

externalIdstring, <= 255 charactersread-only

The external ID of the user in the identity source

idstringread-only

The ID of the user in the identity source

lastUpdatedstring, (date-time)read-only

The timestamp when the user was last updated in the identity source

profileobject(IdentitySourceUserProfileForUpsert)

Contains a set of external user attributes and their values that are mapped to Okta standard and custom profile properties. See the profile object and Declaration of a Custom Identity Source Schema in Using anything as a source.

Note: Profile attributes can only be of the string type.

Response
{ "profile": { "firstName": "Emily", "lastName": "Brock", "email": "brockly@email.com", "userName": "brockly@email.com", "secondEmail": null, "mobilePhone": null, "homeAddress": null } }