INVITE USER

Syntax

INVITE USER
    'email_address' [,'email_address2']
    [WITH (invitation_parameter = value [, ...])];

Description

This lets an Organization user manager invite users into an Organization. The primary role name assigned to the user will be reserved and kept inactive until the user accepts the invitation. If the user rejects the invitation, the role is dropped as well. Additional roles, as well as a default role, can be assigned to the user’s primary role when the invitation is created.

Users can only be invited by a Role with MANAGE_MEMBERS privilege.

Arguments

email_address

The email address of the user to invite into the current Organization. If you have multiple users you can pass a comma delimited list.

WITH invitation_parameter = [, ...]

Optionally, this clause specifies #_store_parameters.

Invitation Parameters

Parameter NameDescription

roles

Specifies a list of additional roles to grant to the user role once the invitation is accepted.

Required: No

Default value: []

Type: List Valid values: See LIST ROLES

default

Specifies the role that should be the default login role for the user. Required: Yes Default value: None Type: String Valid values: See LIST ROLES

Example

Invite a new user to an Organization with specific roles

INVITE USER 'someone@somewhere.com' WITH (
    'roles' = (a_role, sysadmin),
    'default' = sysadmin
);

Invite multiple users to an Organization with specific roles

INVITE USER 'someone@somewhere.com', 'someone@somewhereelse.com' WITH (
    'roles' = (a_role, sysadmin),
    'default' = sysadmin
);

Last updated