Skip to main content
Skip table of contents

Add Composite to Role

The Add Composite to Role operation adds a child role to a composite role. Once a user is assigned the composite role, all child roles in the composite role are automatically assigned to the user.

Input XML

XML
<?xml version="1.0" encoding="UTF-8"?>
<ParentRole>
	<ParentId></ParentId>
	<SubRoles>
		<SubRole>
			<Id></Id>
			<Name></Name>
			<Composite></Composite>
			<ContainerId></ContainerId>
			<Attributes>
       			<Attribute>
            		<Name></Name>
            		<Values>
                		<Value></Value>
            		</Values>
      			</Attribute>
			</Attributes>
		</SubRole>
	</SubRoles>
</ParentRole>

ParentRole

ElementDescriptionPossible values
ParentIdUUID of the composite roleUUID
SubRolesRole definition of the child role

The element contains the following elements:

  • SubRole (Multiple declaration possible)

SubRoles

ElementDescriptionPossible values
SubRolesRole definition of the child role

The element contains the following elements:

  • SubRole (Multiple declaration possible)
SubRoleRole

The element contains the following elements:

  • Id
  • Name
  • Description (optional)
  • Composite (optional)
  • ContainerId
  • Attributes (optional)
IdUUID of the roleAny string
NameName of the roleAny string
DescriptionDescription of the roleAny string
CompositeSpecification of whether the role is a composite role
  • true: The role is a composite role.
  • false: The role is not a composite role. (Default)
ContainerIdName of the RealmAny string
Attributes

Personalized, configurable attributes

The element contains the following elements:

  • Attribute (Multiple declaration possible)

Attributes

ElementDescription
AttributesPersonalized, configurable attributes

The element contains the following elements:

  • Attribute (Multiple declaration possible)
Attribute

Personalized, configurable attribute

The element contains the following elements:

  • Name
  • Values
NameAttribute nameAny string
Values

Attribute values

The element contains the following elements:

  • Value (Multiple declaration possible)
ValueAttribute valueAny 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="ParentRole">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="ParentId"/>
				<xs:element ref="SubRoles"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="ParentId" type="xs:string"/>
	<xs:element name="SubRoles">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="SubRole"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="SubRole">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="Id"/>
				<xs:element ref="Name"/>
				<xs:element ref="Attributes"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Id" 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 maxOccurs="unbounded" ref="Values"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Values">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="Value"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Value" type="xs:string"/>
	<xs:element name="Name" type="xs:string"/>
</xs:schema>

Example

Input

XML
<?xml version="1.0" encoding="UTF-8"?>
<ParentRole>
	<ParentId>3915229f-7544-4701-b1dc-6092861d9101</ParentId>
	<SubRoles>
		<SubRole>
			<Id>4915229f-7544-4701-b1dc-6092861d9102</Id>
			<Name>x4_admin_access_1</Name>
			<Attributes>
       			<Attribute>
            		<Name>Team</Name>
            		<Values>
                		<Value>Red</Value>
            		</Values>
            		<Values>
                		<Value>Blue</Value>
            		</Values>
      			</Attribute>
			</Attributes>
		</SubRole>
		<SubRole>
			<Id>5915229f-7544-4701-b1dc-6092861d9103</Id>
			<Name>x4_admin_access_2</Name>
			<Attributes>
       			<Attribute>
            		<Name>Team</Name>
            		<Values>
                		<Value>Pink</Value>
            		</Values>
            		<Values>
                		<Value>Green</Value>
            		</Values>
      			</Attribute>
			</Attributes>
		</SubRole>
	</SubRoles>
</ParentRole>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.