CreateUsers

Description

This services creates one or more new users.

Arguments

Argument Type Description
auth (optional) Auth The Auth type supplies credentials and optionally, a host name for licensing. The userId and password can be specified with HTTP BASIC or WS-SECURITY instead.
templateUser UserIdentifier Specifies a user account that should be used as a template for creating new users. New users are created based on the user account that you provide in the UserIdentifier.
cloneGroups boolean Specify true to create one or more users with the same group membership as the templateUser. Default is false.
updateIfExists boolean Specify true to update any existing user accounts that are found with the same displayName and loginId.
user (required) UserInfo Describes information about a user. Specify one or more user arguments to create one or more new users.
options UserResponseOptions Specifies whether the service should continue if an error is encountered or stop. Also enables you to limit the data that is returned in the response.

Response

NewUser is returned. The NewUser response contains one UserHolder element for each new user that is created. A temporary password is also returned for each new user account. For more specific information, see NewUser.

Usage

The CreateUsers call enables you create one or more new user accounts in SBM. Use the following arguments to control how the new user accounts are created:

Use the following elements in the options parameter to control how this call is processed and what data is returned:

For more information on the options elements, see UserResponseOptions.

Faults

XML

The following XML is a snippet of the payload this is sent with CreateUsers.

<urn:CreateUsers>
   <urn:auth>
      <urn:userId>admin</urn:userId>
      <urn:password></urn:password>
      <urn:hostname></urn:hostname>
      <urn:loginAsUserId></urn:loginAsUserId>
   </urn:auth>
   <urn:templateUser>
      <urn:displayName></urn:displayName>
      <urn:id></urn:id>
      <urn:uuid></urn:uuid>
      <urn:loginId></urn:loginId>
   </urn:templateUser>
   <urn:cloneGroups>false</urn:cloneGroups>
   <urn:updateIfExists></urn:updateIfExists>
   <urn:user>
      <urn:id>
         <urn:displayName>John Doe</urn:displayName>
         <urn:id></urn:id>
         <urn:uuid></urn:uuid>
         <urn:loginId>JDoe</urn:loginId>
      </urn:id>
      <urn:accessType>ACCESS-USER</urn:accessType>
      <urn:email>johndoe@companyName.com</urn:email>
      <urn:emailCC></urn:emailCC>
      <urn:timezone></urn:timezone>
      <urn:offsetFromGMT>-25200000</urn:offsetFromGMT>
      <urn:dstSavings>3600000</urn:dstSavings>
      <urn:datePreference>DATE-FORMAT-FROM-LOCALE</urn:datePreference>
      <urn:timePreference>TIME-FORMAT-12HOUR</urn:timePreference>
      <urn:namespaceName></urn:namespaceName>
      <urn:phoneNumber>111-111-1111</urn:phoneNumber>
      <urn:locale>en_US</urn:locale>
      <urn:isDeleted></urn:isDeleted>
      <urn:contact></urn:contact>
      <urn:maxNotes>10</urn:maxNotes>
      <urn:maxChangeHistory>10</urn:maxChangeHistory>
      <urn:maxItemsPerPage>20</urn:maxItemsPerPage>
      <urn:group>
         <urn:displayName>CR Submitters</urn:displayName>
      </urn:group>
      <urn:fieldsMask></urn:fieldsMask>
      <urn:notesMask></urn:notesMask>
      <urn:changeHistoryMask></urn:changeHistoryMask>
      <urn:browserMask></urn:browserMask>
      <urn:preferredSolution>
         <urn:displayName>Issue Defect Management</urn:displayName>
      </urn:preferredSolution>
      <urn:solutionData>
         <urn:solution>
            <urn:displayName>Issue Defect Management</urn:displayName>
            <urn:id></urn:id>
            <urn:uuid></urn:uuid>
            <urn:uniqueName></urn:uniqueName>
            <urn:tabName>IDM</urn:tabName>
         </urn:solution>
         <urn:homeReport>
            <urn:displayName>Built-In: All Items</urn:displayName>
            <urn:id></urn:id>
            <urn:uuid></urn:uuid>
         </urn:homeReport>
         <urn:preferredProject>
            <urn:displayName>Animation Pro</urn:displayName>
            <urn:id></urn:id>
            <urn:uuid></urn:uuid>
            <urn:fullyQualifiedName></urn:fullyQualifiedName>
         </urn:preferredProject>
      </urn:solutionData>
   </urn:user>
   <urn:options>
      <urn:multiOption></urn:multiOption>
      <urn:sections>SECTIONS-ALL</urn:sections>
      <urn:specifiedSections></urn:specifiedSections>
   </urn:options>
</urn:CreateUsers>

In this example, a new user is created based on Joe's existing user account. Joe's group membership is replicated as well:

<urn:CreateUsers>
   <urn:auth>
      <urn:userId>admin</urn:userId>
      <urn:password></urn:password>
      <urn:hostname></urn:hostname>
      <urn:loginAsUserId></urn:loginAsUserId>
   </urn:auth>
   <urn:templateUser>
      <urn:displayName></urn:displayName>
      <urn:id></urn:id>
      <urn:uuid></urn:uuid>
      <urn:loginId>Joe</urn:loginId>
   </urn:templateUser>
   <urn:cloneGroups>true</urn:cloneGroups>
   <urn:updateIfExists></urn:updateIfExists>
   <urn:user>
      <urn:id>
         <urn:displayName>John Doe</urn:displayName>
         <urn:id></urn:id>
         <urn:uuid></urn:uuid>
         <urn:loginId>JDoe</urn:loginId>
      </urn:id>
   <urn:user>
</urn:CreateUsers>