X4 Produktdokumentation

Update User

The Update User operation updates the data of the user with the specified ID. The data is defined in the input XML expected by the adapter.

The username cannot be updated.

Input

XML
<?xml version="1.0" encoding="UTF-8"?>
<User>
	<Id></Id>
	<Enabled></Enabled>
	<Totp></Totp>
	<EmailVerified></EmailVerified>
	<FirstName></FirstName>
	<LastName></LastName>
	<Email></Email>
	<Attributes>
		<Attribute>
			<Name></Name>
			<Values>
				<Value></Value>
			</Values>
		</Attribute>
	</Attributes>
	<Credentials>
		<Credential>
			<Type></Type>
			<Value></Value>
			<Temporary></Temporary>
		</Credential>
	</Credentials>
	<RequiredActions></RequiredActions>
	<NotBefore></NotBefore>
</User>


Element

Description

Possible values

User

User definition

The element contains the following elements:

  • Id

  • FirstName (optional)

  • LastName (optional)

  • Email (optional)

  • EmailVerified (optional)

  • Enabled (optional)

  • Totp (optional)

  • Attributes (optional)

  • Credentials (optional)

  • RequiredActions (optional)

  • NotBefore (optional)

Id

Unique ID of the user

UUID

FirstName

The first name of the user

Any string

LastName

The last name of the user

Any string

Email

The e-mail address of the user

E-mail address

EmailVerified

Specifies whether the specified e-mail address is verified.

  • true: The email address is verified.

  • false: The email address is not verified.

Enabled

Specifies whether the user is enabled or disabled

  • true: The user is enabled.

  • false: The user is disabled.

Totp

Specifies whether the password is invalid after the first login

  • true: The user has to change the password after the first login.

  • false: The user does not need to change the password.

Attributes

Personalized, configurable attributes

The element contains the following elements:

  • Attribute (Multiple declaration possible)

Credentials

User credentials

The element contains the following element:

  • Credential

RequiredActions

Specifies whether the user is prompted for action when the user logs in.

VERIFY_EMAIL: The user has to verify his e-mail address after registration.

UPDATE_PROFILE: The user has to update his user profile after logging in.

UPDATE_PASSWORD: The user has to update his password after logging in.

NotBefore

The number of failed login attempts

Integer

Attributes

Element

Description


Attributes

Personalized, configurable attributes

The element contains the following elements:

  • Attribute (Multiple declaration possible)

Attribute

Personalized, configurable attribute

The element contains the following elements:

  • Name

  • Values

Name

Attribute name

Any string

Values

Attribute values

The element contains the following elements:

  • Value (Multiple declaration possible)

Value

Attribute value

Any string

Credentials

The Credentials element defines the type of credential and the associated value. This can be a password, for example.

Element

Description

Possible values

Credentials

User credentials

The element contains the following elements:

  • Credential

Credential

Login data set

The element contains the following elements:

  • Type

  • Value

  • Temporary

Type

Type of login data set, e.g. password

password: The login data set is a password.

Value

Attribute value

Any string

Temporary

Specifies whether the password is temporary

true: The password is temporary.

false: The password is not temporary.

XSD

XML
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	<xs:element name="User">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="Id"/>
				<xs:element ref="Enabled"/>
				<xs:element ref="Totp"/>
				<xs:element ref="EmailVerified"/>
				<xs:element ref="FirstName"/>
				<xs:element ref="LastName"/>
				<xs:element ref="Email"/>
				<xs:element ref="Attributes"/>
				<xs:element ref="Credentials"/>
				<xs:element ref="RequiredActions"/>
				<xs:element ref="NotBefore"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Id" type="xs:string"/>
	<xs:element name="Enabled" type="xs:boolean"/>
	<xs:element name="Totp" type="xs:boolean"/>
	<xs:element name="EmailVerified" type="xs:boolean"/>
	<xs:element name="FirstName" type="xs:NCName"/>
	<xs:element name="LastName" type="xs:NCName"/>
	<xs:element name="Email" type="xs:string"/>
	<xs:element name="Attributes">
		<xs:complexType>
			<xs:sequence>
				<xs:element maxOccurs="unbounded" ref="Attribute"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Attribute">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="Name"/>
				<xs:element ref="Values"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Name" type="xs:string"/>
	<xs:element name="Values">
		<xs:complexType>
			<xs:sequence>
				<xs:element maxOccurs="unbounded" ref="Value"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Credentials">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="Credential"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Credential">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="Type"/>
				<xs:element ref="Value"/>
				<xs:element ref="Temporary"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Type" type="xs:NCName"/>
	<xs:element name="Temporary" type="xs:boolean"/>
	<xs:element name="RequiredActions" type="xs:NCName"/>
	<xs:element name="NotBefore" type="xs:integer"/>
	<xs:element name="Value" type="xs:string"/>
</xs:schema>

Example

Input

XML
<?xml version="1.0" encoding="UTF-8"?>
<User>
	<Id>2302cf2f-9b29-4d62-9c48-67ac5e3b0ddc</Id>
	<Enabled>true</Enabled>
	<Totp>false</Totp>
	<EmailVerified>true</EmailVerified>
	<FirstName>Jane</FirstName>
	<LastName>Doe</LastName>
	<Email>john.doe@example.com</Email>
	<Attributes>
		<Attribute>
			<Name>Employment Relationship</Name>
			<Values>
				<Value>Software Developer</Value>
				<Value>Sub-Team Lead</Value>
			</Values>
		</Attribute>
	</Attributes>
	<Credentials>
		<Credential>
			<Type>password</Type>
			<Value>password123</Value>
			<Temporary>false</Temporary>
		</Credential>
	</Credentials>
	<RequiredActions>VERIFY_EMAIL</RequiredActions>
	<NotBefore>0</NotBefore>
</User>