Add a user to an environment

PUT https://{controlplane_path}/api/1/rest/public/users/{email}/org/{env_org}

Adds an existing user to an Environment and optionally sends an email notification.

Verify if the user's email is as per the list added in the email domain allow list. Refer to Add Email domain allowlist to know how to add email domain allowlist through Admin Manager.

Prerequisites

  • Environment (Org) admin permissions

Path parameters

Key Description
email Required. The email address of the user.
env_org The name of the environment to add the user account.

Query parameters

None.

Request body

 {
  "create_home_directory": true
  "send_email": true
}
Key Type Description
create_home_directory boolean If true, creates a directory for the user.
send_email boolean If true, sends a notification email.

Response

Response body

 
  {
    "email": "..."
    "first_name": "...",
    "last_name": "...",
    "allow_password_login" : true,
    "organizations": [
     {
      "id": "...",
      "name": "...",
      "administrator": "..."
     }
    ],
    "created_by": "...",
    "password_expired": false,
    "ui_access": true,
    "password_last_updated": "...",
    "user_locked_out": false,
    "service_account": false,
    "failed_logins": 0,
    "basic_access": null,
    "maintainers": null,
    "managed": false,
    "create_home_directory": true,
    "send_email": true
  } 
 
Key Type Description
email string The email address of the user.
first_name string The first name of the user.
last_name string The last name of the user.
allow_password_login Boolean If true, the user is allowed to log in with a password.
organizations array An array of objects containing information about the environment (Org) that the user belongs to. Each object contains name and ID of the environment and a Boolean (administrator) that indicates whether the user is assigned the administrator role in the environment.
created_by string The user who originally created the account, if it is a service account.

Learn more: Creating a User

ui_access Boolean If true, the user is granted access to the SnapLogic UI.
password_expired boolean If true, the user's password is expired.
password_last_updated string When the user's password was last changed. Format: UTC
user_locked_out boolean If true, the user is denied access to the Snaplex.
service_account boolean If true the user has a service account.
failed_logins integer The number of login attempts that failed.
basic_access string Format: UTC
maintainers N/A
managed N/A

Error handling

HTTP status codes Status Description Resolution
200 successful An array of objects that user is successfully added to Org. N/A
400 Bad request The request was unacceptable, often due to missing a required parameter.
  • Check if all the required parameters are added accurately.
  • Check if the Headers parameter is set with key as content-type

Troubleshooting

Pipelines results in 404 Not Found

Orgs with the following structure for example: ~SL~Test~ProjectSpace the pipelines results in an error.

The ~ characters might be trying to cause the above error.

Avoid using the ~ character in naming structure.