Skip to main content
Omnitracs Knowledge Base

Create User

createUser

Given a User object and password, this web service creates a user on the Portal.

void createUser(User user, string password) throws WSException

  • user: A User object with the details for creating the user.

    Required elements:
        - firstName
        - forcePwdReset
        - id
        - lastName
        - lockedOut - this value is ignored, but because it is a boolean field it must be passed in the request.
        - obeyDst - ignored if no timeZone name is specified
        - role - name

    Optional elements:
        - companyId - Will default to the authorized user's company if not specified.
        - email - If not specified, the user will be prompted to enter a valid email address the first time he logs on to the Portal.
        - pagerEmail
        - timeZone - name - If not specified, the default timezone and obeyDst settings for the user's company will be used.

    Ignored elements: (auto-filled by the system during creation)
        - qspInstance
        - role - description
        - timeZone - dstLongName
        - timeZone - dstShortName
        - timeZone - gmtOffset
        - timeZone - stdLongName
        - timeZone - stdShortName
     
  • password: A string that sets the user's password.
    The password must adhere to the following guidelines:
        - Must be 8 to 35 characters in length.
        - Must contain at least one alpha and one numeric character.
        - Cannot contain embedded spaces.

Authorization Requirements

The credentials supplied with this method call (as specified in the accompanying WS-Security header) must be authorized to the following application(s) and their associated role-based permissions. 

Required Application Licenses
- Remote Integration

Required User Permissions
- Admin role

Customer integrators are authorized to their own company's data only. 

Sample XML Request

Only the SOAP body is shown. To see a sample SOAP Envelope and Header, click here.

<soap:Body>

   <createUser>

      <user>

         <companyId>MYCOMPANY</companyId>

         <email>user@mycompany.com</email>

         <firstName>John</firstName>

         <forcePwdReset>0</forcePwdReset>

         <id>JOHNDOE</id>

         <lastName>Doe</lastName>

         <lockedOut>0</lockedOut>

         <obeyDst>1</obeyDst>

         <pagerEmail></pagerEmail>

         <qspInstance></qspInstance>

         <role>

            <description></description>

            <name>dispatcherRole</name>

         </role>

         <timeZone>

            <dstLongName></dstLongName>

            <dstShortName></dstShortName>

            <gmtOffset></gmtOffset>

            <name>Eastern Time</name>

            <stdLongName></stdLongName>

            <stdShortName></stdShortName>

         </timeZone>

      </user>

      <password>pAsSwOrD</password>

   </createUser>

</soap:Body>

Sample XML Response

<soapenv:Body>

   <p431:createUserResponse xmlns:p431="http://websvcs.omaswebws"/>

</soapenv:Body>

Exceptions

001 Unknown Error.
003 Company not authorized for integration.
004 User not authorized.
005 Invalid company id.
006 Invalid user id.
007 Invalid first name.
008 Invalid last name.
009 Invalid email.
010 Invalid pagerEmail.
011 Invalid role name.
012 Invalid timeZone name.
013 Invalid password.
014 Cannot create user with duplicate user id. (lightbulb)
015 User already exists with delete flag enabled. (lightbulb)

  • Was this article helpful?