Add a User

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

The following examples show the request and response that are defined in the XSD files for the AddSysAdminUser tag.

Successful Request

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

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XmlInterfaceRequest>
  <AddSysAdminUser>
    <SysAdminUser>
      <Name>admin1</Name>
      <Description>The default administrator user with all privileges</Description>
      <Password>camiant</Password>
      <LockedStatus>0</LockedStatus>
      <RoleRef>
        <Name>Administrator</Name>
      </RoleRef>
      <ScopeRef>
        <Name>Global</Name>
      </ScopeRef>
    </SysAdminUser>
  </AddSysAdminUser>
</XmlInterfaceRequest>
The AddSysAdminUser 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 (Required):

    A clear text

  • LockedStatus (Required):

    0 = unlocked; 1 = locked

  • RoleRef (Required):

    Can specify only one role

  • ScopeRef (Required):

    Can specify multiple scopes

Successful Response

This response follows the AddSysAdminUser tag defined in the XSD files.

<?xml version="1.0" ?>
<Response>
  <Result>0</Result>
  <Command type="XmlInterfaceResponse">
  <Success count="1">Successfully imported 1 User(s).</Success>
  <Failure count="0"></Failure>
 </Command>
</Response>
The AddSysAdminUser errors that a user may receive are:
  • ERROR_USER_INVALID_NAME

    Invalid User Name for: '{$UserName}'

    UserName is an empty string.

  • ERROR_USER_INVALID_ROLE_NAME

    Invalid Role Name for: '{$RoleName}'

    RoleName is an empty string, or 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 is an empty string, or ScopeName is exceeds max length (250 characters).

  • ERROR_USER_ROLE_LINK

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

    RoleName is not defined in CMP.

    .
  • 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_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_SCOPE_LINK

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

    ScopeName is not defined in CMP.

  • ERROR_SCHEMA_INVALID

    If the input OSSI command cannot match the schema specification, there is 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'.

ERROR_USER_INVALID_NAME Request

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

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XmlInterfaceRequest>
  <AddSysAdminUser>
    <SysAdminUser>
      <Name></Name>
      <Description>The default administrator user with all privileges</Description>
      <Password>oracle</Password>
      <LockedStatus>0</LockedStatus>
      <RoleRef>
        <Name>Administrator</Name>
      </RoleRef>
      <ScopeRef>
        <Name>Global</Name>
      </ScopeRef>
    </SysAdminUser>
  </AddSysAdminUser>
</XmlInterfaceRequest>

ERROR_USER_INVALID_NAME Response

The following error response occurs when the user name is invalid.

<?xml version="1.0" ?>
<Response>
  <Result>0</Result>
   <Command type="XmlInterfaceResponse">
   <Success count="0"></Success>
   <Failure count="1">Failed to import 1 User(s).  

   Invalid User Name for: ""</Failure>
  </Command>
</Response>

ERROR_USER_INVALID_ROLE_NAME Request

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

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XmlInterfaceRequest>
  <AddSysAdminUser>
    <SysAdminUser>
      <Name>admin1</Name>
      <Description>The default administrator user with all privileges</Description>
      <Password>oracle</Password>
      <LockedStatus>0</LockedStatus>
      <RoleRef>
        <Name></Name>
      </RoleRef>
      <ScopeRef>
        <Name>Global</Name>
      </ScopeRef>
    </SysAdminUser>
  </AddSysAdminUser>
</XmlInterfaceRequest>

ERROR_USER_INVALID_ROLE_NAME Response

The following error response occurs when the role name is invalid.

<?xml version="1.0" ?>
<Response>
 <Result>0</Result>
  <Command type="XmlInterfaceResponse">
  <Success count="0"></Success>
  <Failure count="1">Failed to import 1 User(s).  
  <Invalid Role Name for: "admin1"</Failure>
</Command>
</Response>

ERROR_USER_INVALID_SCOPE_NAME Request

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

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XmlInterfaceRequest>
  <AddSysAdminUser>
    <SysAdminUser>
      <Name>admin1</Name>
      <Description>The default administrator user with all privileges</Description>
      <Password>oracle</Password>
      <LockedStatus>0</LockedStatus>
      <RoleRef>
        <Name>Administrator</Name>
      </RoleRef>
      <ScopeRef>
        <Name></Name>
      </ScopeRef>
    </SysAdminUser>
  </AddSysAdminUser>
</XmlInterfaceRequest>

ERROR_USER_INVALID_SCOPE_NAME Response

The following error response occurs when the scope name is invalid.

<?xml version="1.0" ?>
<Response>
  <Result>0</Result>
  <Command type="XmlInterfaceResponse">  
  <Success count="0"></Success>
  <Failure count="1">Failed to import 1 User(s).  

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

ERROR_USER_ROLE_LINK Request

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

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XmlInterfaceRequest>
  <AddSysAdminUser>
    <SysAdminUser>
      <Name>admin1</Name>
      <Description>The default administrator user with all privileges</Description>
      <Password>oracle</Password>
      <LockedStatus>0</LockedStatus>
      <ScopeRef>
        <Name>Not Exist Global</Name>
      </ScopeRef>
    </SysAdminUser>
  </AddSysAdminUser>
</XmlInterfaceRequest>

ERROR_USER_ROLE_LINK Response

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

<?xml version="1.0" ?>
<Response>
  <Result>0</Result>
  <Command type="XmlInterfaceResponse">
  <Success count="0"></Success>
  <Failure count="1">Failed to import 1 User(s).  

  User: "admin1" must have an associated Role and Scope.</Failure>
</Command>
</Response>

ERROR_USER_NOROLE_OR_NOSCOPE Request (Scope: Global)

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

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XmlInterfaceRequest>
  <AddSysAdminUser>
    <SysAdminUser>
      <Name>admin1</Name>
      <Description>The default administrator user with all privileges</Description>
      <Password>oracle</Password>
      <LockedStatus>0</LockedStatus>
      <RoleRef>
        <Name>Not Exits Administrator</Name>
      </RoleRef>
      <ScopeRef>
        <Name>Global</Name>
      </ScopeRef>
    </SysAdminUser>
  </AddSysAdminUser>
</XmlInterfaceRequest>

ERROR_USER_NOROLE_OR_NOSCOPE Response (Scope: Global)

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

<?xml version="1.0" ?>
<Response>
  <Result>0</Result>
  <Command type="XmlInterfaceResponse">
  <Success count="0"></Success>
  <Failure count="1">Failed to import 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 (Scope: Not Exist Global)

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

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XmlInterfaceRequest>
  <AddSysAdminUser>
    <SysAdminUser>
      <Name>admin1</Name>
      <Description>The default administrator user with all privileges</Description>
      <Password>oracle</Password>
      <LockedStatus>0</LockedStatus>
      <RoleRef>
        <Name>Administrator</Name>
      </RoleRef>
      <ScopeRef>
        <Name>Not Exist Global</Name>
      </ScopeRef>
    </SysAdminUser>
  </AddSysAdminUser>
</XmlInterfaceRequest>

ERROR_USER_NOROLE_OR_NOSCOPE Response (Scope: Not Exist Global)

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

<?xml version="1.0" ?>
<Response>
  <Result>0</Result>
  <Command type="XmlInterfaceResponse">
  <Success count="0"></Success>
  <Failure count="1">Failed to import 1 User(s).  

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