pp108 : getUnitRoleUsers

getUnitRoleUsers

This method returns the users for a certain role within a unit. This methods supports to get the users for multiple unit-role combinations.

The use of this method is deprecated. Use GetAssignments and specify parameter UnitID and RoleDN.

SOAP Request

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Body>
        <getUnitRoleUsers xmlns="http://schemas.cordys.com/userassignment/UserAssignmentReader/1.0">
            <WorkspaceID>[Workspace ID]</WorkspaceID>
            <assignmentRoot>[Assignment root ID]</assignmentRoot>
            <UnitRoles>
                <UnitRoles>
                    <UnitRole>
                        <UnitId>[Unit ID]</UnitId>
                        <Roles>
                            <RoleDN>[Role DN]</RoleDN>
                            <RoleDN>[Role DN]</RoleDN>
                ...
              </Roles>
                    </UnitRole>
                    <UnitRole>
              ...
            </UnitRole>
            ...
          </UnitRoles>
            </UnitRoles>
        </getUnitRoleUsers>
    </SOAP:Body>
</SOAP:Envelope>

Request Parameters Description

Parameter

Description

Data Type

Accepted Input Value

WorkspaceID

ID of CWS Workspace

String

assignmentRoot

Assignment root ID

String

GUID

unitId

ID of the unit

String

Usually GUID

RoleDN

DN of the role

String

DN

Note:

  • There are two XML nodes named UnitRoles. It may look strange but is required for implementation reasons.

SOAP Response

<getUnitRoleUsersResponse xmlns="http://schemas.cordys.com/userassignment/UserAssignmentReader/1.0">
    <getUnitRoleUsers>[Users details]</getUnitRoleUsers>
</getUnitRoleUsersResponse>

Response Parameters

Parameter

Description

getUnitRoleUsers

String containing XML with unit-role-user combinations, see below

The XML that is returned contains the unit-role combinations from the request, with the users assigned to it.

<Users>
  <User>
    <Name>[User name, if available; else empty]</User>
    <Description>[User description, if available; else empty]</Description>
    <UserDN>[User DN]</UserDN>
    <RoleDN>[Role DN]</RoleDN>
    <UnitID>[Unit ID]</UnitID>
    <UnitQName>[Unit qualified name]</UnitQName>
  </User>
  <User>
    ...
  </User>
  ...
</Users>