X4 Produktdokumentation

Create new User 1

The Create new User operation creates a new sub-group in Keycloak. The data is defined in the input XML expected by the adapter.

Input XML

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

User

Element

Description

Possible values

User


The element contains the following elements:

  • Username

  • FirstName (optional)

  • LastName (optional)

  • Email (optional)

  • EmailVerified (optional)

  • Enabled (optional)

  • Attributes (optional)

  • Credentials (optional)

Username

The user name requested by the user

Any string

FirstName

The user's first name

Any string

LastName

The user's last name

Any string

Email

The user’s email address.

Email address

EmailVerified

Indicates whether the specified email address is verified.

  • true: The email address is verified.

  • false: The email address is not verified.

Enabled

Indicates whether the user is enabled or disabled.

  • true: The user is enabled.

  • false: The user is disabled.

Attributes

Personalized, configurable attributes

The element contains the following elements:

  • Attribute (multiple declaration possible)

Credentials

User credentials

The element contains the following element:

  • Credential

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 specifies the type of login record and its value. This can be a password, for example.

Element

Description

Possible values

Credentials

User credentials

The element contains the following elements:

  • Credential

Credential

Login record

The element contains the following elements:

  • Type

  • Value

  • Temporary

Type

Type of login record, such as password

password: The login record 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="Username"/>
				<xs:element ref="FirstName"/>
				<xs:element ref="LastName"/>
				<xs:element ref="Email"/>
				<xs:element ref="EmailVerified"/>
				<xs:element ref="Enabled"/>
				<xs:element ref="Attributes"/>
				<xs:element ref="Credentials"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Username" type="xs:NCName"/>
	<xs:element name="FirstName" type="xs:NCName"/>
	<xs:element name="LastName" type="xs:NCName"/>
	<xs:element name="Email" type="xs:string"/>
	<xs:element name="EmailVerified" type="xs:boolean"/>
	<xs:element name="Enabled" type="xs:boolean"/>
	<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="Value" type="xs:string"/>
</xs:schema>

Examples

Input

XML
<?xml version="1.0" encoding="UTF-8"?>
<User>
	<Username>JohnDoe</Username>
	<FirstName>John</FirstName>
	<LastName>Doe</LastName>
	<Email>John.Doe@example.com</Email>
	<EmailVerified>true</EmailVerified>
	<Enabled>true</Enabled>
	<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>
</User>