importLdapUser

Import a user from LDAP

This command adds one or more users from an LDAP realm to the server.

Format

udclient [global-args...] [global-flags...]
  importLdapUser [parameters]

Parameters

Table 1. Parameters
Parameter Type Required Description
user string true Name or pattern of the users to be imported. Supports wildcard character *.
authenticationRealm string true Authentication realm name or ID

Example of importing a user with auth token

curl -sku 'PasswordIsAuthToken:23453425-dfgfgd-23432-sdfsf' 
  'https://deployserver.example.com:8443/cli/user/import?user=jsmith
  &authenticationRealm=Internal Security' 
  -X PUT

Example of importing users using a JSON file

udclient -username jsmith -password passwd 
  -weburl https://deployserver.example.com:8443
      importLdapUser importUsers.json

Example JSON request

{
        "name": "importUsers",
        "authorizationRealm": "Internal Security",
        "users": [
                  "jdoe",
                  "jsmith"
                 ]
}

Example response

{
  "id":"18b3e4ac-13d2-9ecb-f12c-d078fe0f06e5",
  "name":"jdoe",
  "actualName":"John Doe",
  "displayName":"JOHN DOE",
  "email":"john.doe@example.org",
  "deleted":false,
  "deletedDate":0,
  "authenticationRealm":"18b3e49e-987d-6595-7a67-8b6d47c8cbf8",
  "isLockedOut":false,
  "lastLoginDate":1697793306115,
  "isDeletable":true,
  "namePattern":"john.doe@example.org"
}

Related REST command: Import a user from LDAP.