AddUser

Updated at:

Add organization members.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

quickbi-public:AddUser

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

AdminUser deprecated

boolean

No

Specifies whether to assign the organization administrator role. Valid values:

  • true

  • false

Important This parameter is deprecated. It is ignored if RoleIds is specified.

true

AuthAdminUser deprecated

boolean

No

Specifies whether to assign the permission administrator role. Valid values:

  • true

  • false

Important This parameter is deprecated. It is ignored if RoleIds is specified.

true

UserType

integer

Yes

The type of the organization member. Valid values:

  • 1: developer

  • 2: viewer

  • 3: analyst

1

AccountId

string

No

The ID of the Alibaba Cloud account.

Warning The AccountId parameter will be required in Quick BI versions released after December 31, 2024. We recommend that you update your API calls to include this parameter before then.

191476xxxxx23754

AccountName deprecated

string

No

The name of the Alibaba Cloud account.

  • For a sub-account, use the format master account:sub-account. Example: master_test@aliyun.com:subaccount.

  • The maximum length is 50 characters.

xxxxxx@163.com

NickName

string

Yes

The user's nickname.

  • The maximum length is 50 characters.

  • The nickname can contain Chinese characters, letters, digits, and the following special characters: _ \ / | () [].

张三

RoleIds

string

No

The IDs of the predefined or custom organization roles to assign. You can specify up to three role IDs, separated by commas (,). Valid values for predefined roles:

  • 111111111: organization administrator

  • 111111112: permission administrator

  • 111111113: regular user

111111111,456

CopilotModules

string

No

The Copilot modules to enable for the user. To enable multiple modules, specify their codes separated by a comma (,).

  • qreport: Q Report

  • qExploreNum: Q Explore

  • smartQAskNum: Q&A with Data

  • smartQDevNum: Q-assisted Building

qreport,qExploreNum

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

D787E1A3-A93C-424A-B626-C2B05DF8D885

Result

object

The details of the newly added Alibaba Cloud user.

AccountName

string

The Alibaba Cloud account.

xxxxxx@163.com

AdminUser

boolean

Indicates whether the organization administrator role is assigned. Valid values:

  • true

  • false

Important This parameter is deprecated. It does not take effect when RoleIdList is specified.

true

AuthAdminUser

boolean

Indicates whether the permission administrator role is assigned. Valid values:

  • true

  • false

Important This parameter is deprecated. It does not take effect when RoleIdList is specified.

true

NickName

string

The nickname of the Alibaba Cloud account.

张三

RoleIdList

array

A list of organization role IDs assigned to the user.

integer

The ID of an organization role. You can assign a maximum of three roles. Predefined roles include:

  • organization administrator (predefined role): 111111111

  • permission administrator (predefined role): 111111112

  • standard user (predefined role): 111111113

111111111

CopilotModules

array

The Copilot modules for which the user has a quota.

string

A Copilot module for which the user has a quota.

qreport

UserId

string

The user ID in Quick BI.

b5d8fd9348cc4327****afb604

UserType

integer

The user type. Valid values:

  • 1: developer

  • 2: viewer

  • 3: analyst

1

Success

boolean

Indicates whether the request was successful. Valid values:

  • true

  • false

true

Examples

Success response

JSON format

{
  "RequestId": "D787E1A3-A93C-424A-B626-C2B05DF8D885",
  "Result": {
    "AccountName": "xxxxxx@163.com",
    "AdminUser": true,
    "AuthAdminUser": true,
    "NickName": "张三",
    "RoleIdList": [
      111111111
    ],
    "CopilotModules": [
      "qreport"
    ],
    "UserId": "b5d8fd9348cc4327****afb604",
    "UserType": 1
  },
  "Success": true
}

Error codes

HTTP status code

Error code

Error message

Description

400 Organization.Developers.ReachedTheUpperLimit The developers of the organization have reached the upper limit:%s The developers of the organization have reached the upper limit:%s
400 Organization.Viewers.ReachedTheUpperLimit The visitors of the organization have reached the upper limit:%s. The visitors of the organization have reached the upper limit:%s.
400 Organization.Analysts.ReachedTheUpperLimit The analysts of the organization have reached the upper limit:%s. The analysts of the organization have reached the upper limit:%s.
400 NickName.AlreadyIn.Organization The alias already exists. The alias already exists.
400 User.AlreadyIn.Organization This user is already a member of the current organization. This user is already a member of the current organization.
400 Instance.Over.MaxLicense You have reached the maximum number of users that can be added. Please upgrade the configurations or remove some users first.
400 AnalystUser.NotSupport.AdminOrDevRole Analyst users do not support granting workspace administrator or developer roles.
400 Workspace.Not.Exist The group workspace does not exist. The group workspace does not exist.
400 Workspace.Type.Error The type of group workspace is invalid. The type of group workspace is invalid.
400 Viewer.AddInTo.Workspace Organization members with viewer type are not allowed to add to workspace: %s. Organization members with viewer type are not allowed to add to workspace: %s.
400 User.AlreadyIn.Workspace This user already exists. This user already exists.
400 User.AlreadyIn.Role The user is already assigned this role. The user is already assigned this role.
400 User.OrganizationRole.NotExist User %s must have role in organization. User %s must have role in organization.
400 Viewer.CannotHave.CustomRole Organization viewer cannot have custom roles. Organization viewer cannot have custom roles.
400 UserAnalyst.NotSupport.ThisRole This role has permissions that analysts cannot grant. This role has permissions that analysts cannot grant.
400 RoleCount.ExceedsLimit.Error The user role cannot exceed three. The user role cannot exceed three.
400 BindRole.NotExist.Error Bind role not exist, %s. Bind role not exist, %s.
400 DirtyData.Duplicate.User Dirty data,duplicate user: %s.
400 Robot.Module.Exhausted The Quota of %s module has been exhausted. The quota for the %s module has been exhausted.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.