Update User

PUT {{apiPath}}/environments/{{envID}}/users/{{userID}}

You can use the PUT /environments/{{envID}}/users/{{userID}} operation to update existing attribute properties. For PUT requests, the update operation removes any existing attribute property values omitted from the request body.

The recommended way to construct a PUT request is to perform a GET first and then use the response body to construct the PUT request body with your property value modifications.

The response data shows the updates for all attribute values specified in the request body.

Users who are not authenticating with PingOne must be assigned an identity provider with the identityProvider.id attribute. If identityProvider.id is not provided, PingOne is set as the default identity provider. The identityProvider.type value is read-only, and its value is dependent on the value of identityProvider.id. If identityProvider.id is not provided, the default value of identityProvider.type is PING_ONE.

Important: Users who authenticate with an authoritative identity provider cannot self-service modify their account. Their user.identityProvider.id attribute is not null and their user.identityProvider.type attribute is not PING_ONE.

Note: If the user does not have update access to an attribute, a 403 Forbidden error is returned if an update is attempted for that attribute.

Note: You can enable multi-factor authentication by setting mfaEnabled to true with POST Create User, POST Create User (Import), or PUT Update User MFA Enabled. You cannot update mfaEnabled with PUT Update User or PATCH Update User.

Prerequisites

PropertyTypeRequired?
accountIdStringOptional
address.streetAddressStringOptional
address.countryCodeStringOptional
address.localityStringOptional
address.regionStringOptional
address.postalCodeStringOptional
address.zipCodeStringOptional
emailStringOptional
localeArray [String]Optional
mobilePhoneStringOptional
name.givenStringOptional
name.familyStringOptional
name.middleStringOptional
name.honorificPrefixStringOptional
name.honorificSuffixStringOptional
name.formattedStringOptional
nicknameStringOptional
photo.hrefStringOptional
population.idStringRequired
preferredLanguageStringOptional
primaryPhoneStringOptional
timeZoneStringOptional
titleStringOptional
typeStringOptional
usernameStringRequired

See the User operations data model for full property descriptions.

Request Body

{"username"=>"joe@example.com", "name"=>{"formatted"=>"Joe Smith", "given"=>"Joe", "middle"=>"H.", "family"=>"Smith", "honorificPrefix"=>"Dr.", "honorificSuffix"=>"IV"}, "nickname"=>"Putty", "title"=>"Senior Director", "preferredLanguage"=>"en-gb;q=0.8, en;q=0.7", "locale"=>"en-gb", "email"=>"joe@example.com", "primaryPhone"=>"+1.2225554444", "mobilePhone"=>"+1.4445552222", "photo"=>{"href"=>"{{imageUrl}}>"}, "address"=>{"streetAddress"=>"123 Main Street", "locality"=>"Springfield", "region"=>"WA", "postalCode"=>"98701", "countryCode"=>"US"}, "accountId"=>"5", "type"=>"tele", "timezone"=>"America/Los_Angeles"}

RESPONSES

status: OK

{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/8376797d-641c-4e7b-8bc1-2fdf71916cab"},"environment":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"population":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/populations/60971d3b-cc5a-4601-9c44-2be541f91bf1"},"devices":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/8376797d-641c-4e7b-8bc1-2fdf71916cab/devices"},"roleAssignments":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/8376797d-641c-4e7b-8bc1-2fdf71916cab/roleAssignments"},"password":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/8376797d-641c-4e7b-8bc1-2fdf71916cab/password"},"password.reset":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/8376797d-641c-4e7b-8bc1-2fdf71916cab/password"},"password.set":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/8376797d-641c-4e7b-8bc1-2fdf71916cab/password"},"password.check":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/58177d50-1f2b-4f08-a95c-c618c83c0669/password"},"password.recover":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/8376797d-641c-4e7b-8bc1-2fdf71916cab/password"},"linkedAccounts":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/8376797d-641c-4e7b-8bc1-2fdf71916cab/linkedAccounts"},"account.sendVerificationCode":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/8376797d-641c-4e7b-8bc1-2fdf71916cab"},"memberOfGroups":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/8376797d-641c-4e7b-8bc1-2fdf71916cab/memberOfGroups"}},"id":"8376797d-641c-4e7b-8bc1-2fdf71916cab","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"account":{"canAuthenticate":true,"status":"OK"},"accountId":"5","address":{"streetAddress":"123 Main Street","locality":"Springfield","region":"WA","postalCode":"98701","countryCode":"US"},"createdAt":"2022-10-11T16:54:38.125Z","email":"joe@example.com","enabled":true,"identityProvider":{"type":"PING_ONE"},"lastSignOn":{"at":"2022-10-11T17:03:47.696Z","remoteIp":"54.86.50.139"},"lifecycle":{"status":"ACCOUNT_OK"},"locale":"en-gb","mfaEnabled":false,"mobilePhone":"+1.4445552222","name":{"formatted":"Joe Smith","given":"Joe","middle":"H.","family":"Smith","honorificPrefix":"Dr.","honorificSuffix":"IV"},"nickname":"Putty","photo":{"href":"https://www.google.com/imgres?imgurl=https%3A%2F%2Fwww.pingidentity.com%2Fcontent%2Fdam%2Fping-6-2-assets%2Ftopnav-json-configs%2FPing-Logo.svg\u0026imgrefurl=https%3A%2F%2Fwww.pingidentity.com%2Fen.html\u0026tbnid=MbFHzW8q8CvofM\u0026vet=12ahUKEwjJo936s7P7AhVrunIEHeO2BVQQMygAegUIARDAAQ..i\u0026docid=LNAdqRbt76nJPM\u0026w=800\u0026h=800\u0026q=ping%20identity%20user\u0026hl=en\u0026ved=2ahUKEwjJo936s7P7AhVrunIEHeO2BVQQMygAegUIARDAAQ"},"population":{"id":"60971d3b-cc5a-4601-9c44-2be541f91bf1"},"preferredLanguage":"en-gb;q=0.8, en;q=0.7","primaryPhone":"+1.2225554444","timezone":"America/Los_Angeles","title":"Senior Director","type":"tele","updatedAt":"2022-11-16T19:12:23.459Z","username":"joe@example.com","verifyStatus":"NOT_INITIATED"}