X4 Produktdokumentation

Remove Roles from a User

The Remove Roles from a User operation removes assigned roles of the specified user.

Input XML

XML
<?xml version="1.0" encoding="UTF-8"?>
<User>
	<UserId></UserId>
	<Roles>
		<Role>
			<Id></Id>
			<Name></Name>
		</Role>
	</Roles>
</User>

User

Element

Description

Possible values

User

User definition

The element contains the following elements:

  • UserId

  • Roles

UserId

UUID of the user

UUID

Roles

Role definitions

The element contains the following elements:

  • Role (Multiple declaration possible)

Roles

Element

Description

Possible values

Roles

Role definitions

The element contains the following elements:

  • Role (Multiple declaration possible)

Role

Role definition

The element contains the following elements:

  • Id

  • Name

Id

UUID of the role

UUID

Name

Name of the role

Any string

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="UserId"/>
				<xs:element ref="Roles"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="UserId" type="xs:string"/>
	<xs:element name="Roles">
		<xs:complexType>
			<xs:sequence>
				<xs:element maxOccurs="unbounded" ref="Role"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Role">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="Name"/>
				<xs:element ref="Id"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Name" type="xs:string"/>
	<xs:element name="Id" type="xs:string"/>
</xs:schema>

Example

Input

XML
<?xml version="1.0" encoding="UTF-8"?>
<User>
	<UserId>f37db159-8c3c-4b0a-ae7f-5362dcf4ed1b</UserId>
	<Roles>
		<Role>
			<Name>Developer</Name>
			<Id>2d725ff5-4da7-4f84-9224-d641499723de</Id>
		</Role>
		<Role>
			<Name>Software Architect</Name>
			<Id>78f84034-3129-4636-97c5-189b338deeb4</Id>
		</Role>
	</Roles>
</User>