All Products
Search
Document Center

Quick BI:ListWorkspaceUserRolesByUserId

Last Updated:Nov 14, 2025

Queries all workspace roles of a user.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

UserId

string

Yes

The ID of the Quick BI user. This is not your Alibaba Cloud account ID. You can call the QueryUserInfoByAccount operation to obtain the user ID.

afas-********asfasg

Response elements

Element

Type

Description

Example

object

The response schema.

RequestId

string

The request ID.

DC4E***************F67E2C3

Result

array<object>

The list of all workspace role information.

array<object>

Each workspace object.

WorkspaceId

string

The workspace ID.

9337d121-a78f-4c1b-a8bc-f81de117****

WorkspaceName

string

The workspace name.

test

RoleModel

object

The workspace role information.

RoleId

string

The workspace role ID. This includes, but is not limited to, the following preset workspace roles:

  • 25: Workspace Admin (preset role)

  • 26: Workspace Developer (preset role)

  • 27: Workspace Analyst (preset role)

  • 30: Workspace Viewer (preset role)

111111111

RoleCode

string

The code that corresponds to the preset workspace role. This parameter is not returned for custom roles.

34637***35

RoleName

string

The name of the workspace role.

arms-admin

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

Examples

Success response

JSON format

{
  "RequestId": "DC4E***************F67E2C3",
  "Result": [
    {
      "WorkspaceId": "9337d121-a78f-4c1b-a8bc-f81de117****",
      "WorkspaceName": "test",
      "RoleModel": {
        "RoleId": "111111111",
        "RoleCode": "34637***35",
        "RoleName": "arms-admin"
      }
    }
  ],
  "Success": true
}

Error codes

HTTP status code

Error code

Error message

Description

400 Internal.System.Error An internal system error occurred. An internal system error occurred.
400 User.Not.In.Organization The specified user is not in the organizational unit. The specified user is not in the organizational unit.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.