Search Results for

    Show / Hide Table of Contents

    Method CreateUser

    CreateUser(String, UserContract, String)

    Create a user

    Declaration
    string CreateUser(string connectionId, UserContract user, string password)
    Parameters
    Type Name Description
    System.String connectionId

    The connection id to identify your connection. See also ConnectionId

    UserContract user

    User to create

    System.String password

    Optional: Password for user Default: null

    Returns
    Type Description
    System.String

    The created user id

    Remarks
    • You need "Access to users and user groups" access right (01002040-38a7-11d8-a902-0050bf427e8f). See also GetUserAdminAccessRights(String, String)
    Examples

    POST http://YourServerName/InfoShare/Json/Common/CreateUser

    Example for create a user.

    {
       "connectionId": "b6742bb8-ef97-44ae-819b-a2fa2200908a",
       "user": {
         "Active": true,
         "Obsolete": false,
         "CanChangeLanguage": true,
         "CanChangeOptions": true,
         "CanExecuteDefaultSearch": true,
         "LoginWithInternalPassword": false,
         "LoginName": "demo",
         "DisplayName": "Demo",
         "Email": "demo@demo.com",
         "HasEmailNotification": true,
         "LoginWithoutPassword": true,
         "NamedUser": false,
         "ApplicationUser": false,
         "AllowedIPEndpoints: ["fe80::8116:9e00:ce37:6993%18","172.28.5.90"]},
         "password": "",
         "SID": "S-1-5-21-515967899-920026266-1708537768-1000",
         "IgnorePasswordExpiration": true
    }

    Response:

    {
       "CreateUserResult": "172935af-62e0-e911-a94a-00155d290a08"
    }
    Exceptions
    Type Condition
    ServiceException

    The connection id {connectionId} isn't valid or has expired (10008)

    ServiceException

    No more named-user licences available! (10053)

    ServiceException

    There are no more application user licences available! (10054)

    ServiceException

    User login name ({userLoginName}) already exists (deactivated or deleted) (10068)

    ServiceException

    Object with id {id} already exists (10078)

    ServiceException

    The administrative context {administrativeContext} is already checked out by user {displayLoginName} (10129)

    ServiceException

    Verification code is needed: Verification code not yet verified (10152)

    ServiceException

    AbsenceDateStart {user.AbsenceDateStart} must be before AbsenceDateEnd {user.AbsenceDateEnd} (10263)

    ServiceException

    AbsenceDateStart and AbsenceDateEnd: Both values must be set or neither of them (10264)

    ServiceException

    A user can not assign himself as deputy (10265)

    ServiceException

    User not found {DeputyRepresantiveUserId} (10047)

    ServiceException

    If you define LoginWithInternalPassword, you must also define a password (10370)

    Back to top Copyright © Kendox