Update a User

Note: This query is not available to Policy servers in NW-CMP mode.

The following examples show the requests and responses that are defined in the XSD files for the UpdateSysAdminUser tag.

Request

This request follows the UpdateSysAdminUser tag defined in the XSD files.

<XmlInterfaceRequest>
  <UpdateSysAdminUser>
    <SysAdminUser>
      <Name>admin1</Name>
      <Description>New The default administrator user with all 
         privileges</Description>
      <LockedStatus>0</LockedStatus>
      <RoleRef>
        <Name>Administrator</Name>
      </RoleRef>
      <ScopeRef>
        <Name>Global</Name>
      </ScopeRef>
    </SysAdminUser>
  </UpdateSysAdminUser>
</XmlInterfaceRequest>
The UpdateSysAdminUser operation parameters are:
  • Name (Required)

    250 characters (string); can only contain the characters A–Z, a–z, 0–9, period (.), hyphen (-), and underline (_).

  • Description (Optional)

    250 characters (string)

  • Password (Optional)

    A clear text

  • LockedStatus (Optional)

    0 = unlocked; 1 = locked

  • RoleRef (Optional)

    Can specify only one role

  • ScopeRef (Optional)

    Can specify multiple scopes

The probable errors a user may receive are as follows:
  • ERROR_USER_NAME_NOT_EXIST

    Specified User does not exist: '{$UserName}'

    The specified user is not in system.

  • ERROR_USER_INVALID_NAME

    Invalid User Name for: '{$UserName}'

    User Name is an empty string.

  • ERROR_USER_NAME_TOO_LONG

    User Name exceeds max length for: '{$UserName}'

    UserName exceeds max length (250 characters).

  • ERROR_USER_DESCRIPTION_TOO_LONG

    User Description exceeds max length. User: '{$UserName}'

    Description exceeds max length (250 characters)

  • ERROR_USER_NOROLE_OR_NOSCOPE

    User: '{$Username}' must have an associated Role and Scope.

    Non-Role or non-Scope is defined in OSSI command.

  • ERROR_USER_INVALID_ROLE_NAME

    Invalid Role Name for: '{$RoleName}'

    RoleName exceeds max length (250 characters), or There is more than one Role defined.

  • ERROR_USER_INVALID_SCOPE_NAME

    Invalid Scope Name for: '{$ScopeName}'

    ScopeName exceeds max length (250 characters).

  • ERROR_USER_ROLE_LINK

    The user: {$UserName}'s associated role does not exist. Please create it first.

    RoleName is an empty string, or RoleName is not defined in CMP.

  • ERROR_USER_SCOPE_LINK

    The user: {$UserName}'s associated scope does not exist. Please create it first.

    ScopeName is an empty string, or ScopeName is not defined in CMP.

  • ERROR_SCHEMA_INVALID

    If the input OSSI command cannot match the schema specification, thereis an error-message response to the operator. For example, if you define a LockStatus with a string, the following message is reported:

    Error parsing import file: Error parsing import file: cvc-datatype-valid.1.2.1: 'ABC' is not a valid value for 'integer'.

Response

The response to this request follows the generic Response tag defined in the XSD files.

<Response>
 <Result>0</Result>
  <Command type="XmlInterfaceResponse">
  <Success count="1">Successfully updated 1 User(s).</Success>
  <Failure count="0"></Failure> 
</Command>
</Response>

ERROR_USER_NAME_NOT_EXIST Request

This request follows the UpdateSysAdminUser tag defined in the XSD files.

<XmlInterfaceRequest>
  <UpdateSysAdminUser>
    <SysAdminUser>
      <Name>NotExistadmin1</Name>
      <Description>New The default administrator user with all 
         privileges</Description>
      <LockedStatus>0</LockedStatus>
      <RoleRef>
        <Name>Administrator</Name>
      </RoleRef>
      <ScopeRef>
        <Name>Global</Name>
      </ScopeRef>
    </SysAdminUser>
  </UpdateSysAdminUser>
</XmlInterfaceRequest>

ERROR_USER_NAME_NOT_EXIST Response

The following error response occurs when the user name does not exist.

<Response>
  <Result>0</Result>
   <Command type="XmlInterfaceResponse">
   <Success count="0"></Success>
   <Failure count="1">Failed to update 1 User(s).  

   Specified User does not exist: "NotExistadmin1"</Failure>
 </Command>
</Response>

ERROR_USER_NOROLE_OR_NOSCOPE Request

This request follows the UpdateSysAdminUser tag defined in the XSD files.

<XmlInterfaceRequest>
  <UpdateSysAdminUser>
    <SysAdminUser>
      <Name>admin1</Name>
      <Description>New The default administrator user with all 
         privileges</Description>
      <LockedStatus>0</LockedStatus>
      <RoleRef>
        <Name>not exist Administrator</Name>
      </RoleRef>
      <ScopeRef>
        <Name>Global</Name>
      </ScopeRef>
    </SysAdminUser>
  </UpdateSysAdminUser>
</XmlInterfaceRequest>

ERROR_USER_NOROLE_OR_NOSCOPE Response

The following error response occurs when the role specified for the user does not exist.

<Response>
 <Result>0</Result>
   <Command type="XmlInterfaceResponse">
   <Success count="0"></Success>
   <Failure count="1">Failed to update 1 User(s).  

   The user: admin1's associated role does not exist. Please create it first.</Failure>
 </Command>
</Response>

ERROR_USER_NOROLE_OR_NOSCOPE Request

This request follows the UpdateSysAdminUser tag defined in the XSD files.

<XmlInterfaceRequest>
  <UpdateSysAdminUser>
    <SysAdminUser>
      <Name>admin1</Name>
      <Description>New The default administrator user with all 
         privileges</Description>
      <LockedStatus>0</LockedStatus>
      <RoleRef>
        <Name>Administrator</Name>
      </RoleRef>
      <ScopeRef>
        <Name>Not exist Global</Name>
      </ScopeRef>
    </SysAdminUser>
  </UpdateSysAdminUser>
</XmlInterfaceRequest>

ERROR_USER_NOROLE_OR_NOSCOPE Response

The following error response occurs when the specified scope does not exist for the user.

<Response>
 <Result>0</Result>
   <Command type="XmlInterfaceResponse">
   <Success count="0"></Success>
   <Failure count="1">Failed to update 1 User(s).  

   The user: admin1's associated scope does not exist. Please create it first.</Failure>
 </Command>
</Response>

ERROR_USER_INVALID_ROLE_NAME Request

This request follows the UpdateSysAdminUser tag defined in the XSD files.

<XmlInterfaceRequest>
  <UpdateSysAdminUser>
    <SysAdminUser>
      <Name>admin1</Name>
      <Description>New The default administrator user with all 
         privileges</Description>
      <LockedStatus>0</LockedStatus>
      <RoleRef>
        <Name>123</Name>
      </RoleRef>
      <RoleRef>
        <Name>Administrator</Name>
      </RoleRef>
      <ScopeRef>
        <Name>123</Name>
      </ScopeRef>
    </SysAdminUser>
  </UpdateSysAdminUser>
</XmlInterfaceRequest>

ERROR_USER_INVALID_ROLE_NAME Response

The following error response occurs when the role name either exceeds the maximum length of 250 characters, or there is more than one Role defined.

 <Response>
   <Result>0</Result>
   <Command type="XmlInterfaceResponse">
   <Success count="0"></Success>
   <Failure count="1">Failed to update 1 User(s).  

   Invalid Role Name for: "admin1"</Failure>
 </Command>
</Response>