addUserToGroups

Add a user to one or more groups within a domain.

Location

/services/webservices/system/admin/user/operations/

Request Elements

domainName: The user’s domain name.

userName: The user name.

groupNames: List of group names (and their domains if needed) to add the user into.

Request Example

In this example, you are adding user composite\jean to the admin group in the composite domain and to the mgrs group in the production domain.

<user:addUserToGroups xmlns:user="http://www.compositesw.com/services/system/admin/user">
  <user:domainName>composite</user:domainName>
  <user:userName>jean</user:userName>
  <user:groupNames>
    <user:entry>
      <user:name>admins</user:name>
      <user:domain>composite</user:domain>
    </user:entry>
    <user:entry>
      <user:name>mgrs</user:name>
      <user:domain>production</user:domain>
    </user:entry>
   </user:groupNames>
</user:addUserToGroups>

Response Elements

N/A

Faults

NotAllowed: If the user cannot be updated as requested. The group membership may not be updatable, like the composite domain’s “all” group.

NotAllowed: If an attempt is made to use this operation with an insufficient license.

NotFound: If the domain does not exist.

NotFound: If the user does not exist.

NotFound: If any of the provided groups do not exist.

Security: If the user does not have the ACCESS_TOOLS and MODIFY_ALL_USERS rights.