All Products
Search
Document Center

Identity as a Service:ListOrganizationalUnits

Last Updated:Aug 01, 2025

Performs a paged query for EIAM organizational units.

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 support 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

eiam:ListOrganizationalUnits

list

*OrganizationalUnit

acs:eiam:{#regionId}:{#accountId}:instance/{#InstanceId}/organizationalunit/*

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

idaas_ue2jvisn35ea5lmthk267xxxxx

PageNumber

integer

No

The page number of the page to return. Default value: 1.

1

PageSize

integer

No

The number of entries to return on each page. Default value: 20. Maximum value: 100.

20

OrganizationalUnitIds

array

No

The list of organizational unit IDs. The number of IDs in the list cannot exceed 100.

[ou_wovwffm62xifdziem7an7xxxxx]

string

No

The organizational unit ID.

ou_wovwffm62xifdziem7an7xxxxx

OrganizationalUnitName

string

No

The name of the organizational unit. An exact match is used for the query.

name_001

OrganizationalUnitNameStartsWith

string

No

The prefix of the name of the organizational unit. A left-side match is used for the query.

name

ParentId

string

No

The ID of the parent organizational unit.

ou_wovwffm62xifdziem7an7xxxxx

Response parameters

Parameter

Type

Description

Example

object

The response.

RequestId

string

The request ID.

0441BD79-92F3-53AA-8657-F8CE4A2B912A

TotalCount

integer

The total number of entries that are returned. This value is the total number of matched entries. The maximum number of entries that can be returned in a single request is specified by PageSize.

100

OrganizationalUnits

array<object>

The list of organizational units.

object

The data object of the organizational unit.

OrganizationalUnitId

string

The organizational unit ID.

ou_wovwffm62xifdziem7an7xxxxx

OrganizationalUnitName

string

The name of the organizational unit.

test_organizationalUnit_name

ParentId

string

The ID of the parent organizational unit.

ou_wovwffm62xifdziem7an7xxxxx

OrganizationalUnitExternalId

string

The external ID of the organizational unit. This ID is used to map the data of the organizational unit to the data of an external system. By default, the value of this parameter is the organizational unit ID.

Note: The external ID must be unique within the same source type and source ID.

ou_wovwffm62xifdziem7an7xxxxx

OrganizationalUnitSourceType

string

The source type of the organizational unit. Valid values:

  • build_in: The organizational unit is created in IDaaS.

  • ding_talk: The organizational unit is imported from DingTalk.

  • ad: The organizational unit is imported from Active Directory (AD).

  • ldap: The organizational unit is imported from a Lightweight Directory Access Protocol (LDAP) directory.

  • we_com: The organizational unit is imported from WeCom.

build_in

OrganizationalUnitSourceId

string

The source ID of the organizational unit.

idaas_ue2jvisn35ea5lmthk267xxxxx

CreateTime

integer

The time when the organizational unit was created. The value is a UNIX timestamp. Unit: milliseconds.

1652085686179

UpdateTime

integer

The time when the organizational unit was last updated. The value is a UNIX timestamp. Unit: milliseconds.

1652085686179

Description

string

The description of the organizational unit.

Test organizational unit

InstanceId

string

The instance ID.

idaas_ue2jvisn35ea5lmthk267xxxxx

Leaf

boolean

Indicates whether the organizational unit is a leaf node. A value of true indicates that the organizational unit has no child nodes. A value of false indicates that the organizational unit has child nodes.

false

Examples

Success response

JSON format

{
  "RequestId": "0441BD79-92F3-53AA-8657-F8CE4A2B912A",
  "TotalCount": 100,
  "OrganizationalUnits": [
    {
      "OrganizationalUnitId": "ou_wovwffm62xifdziem7an7xxxxx",
      "OrganizationalUnitName": "test_organizationalUnit_name",
      "ParentId": "ou_wovwffm62xifdziem7an7xxxxx",
      "OrganizationalUnitExternalId": "ou_wovwffm62xifdziem7an7xxxxx",
      "OrganizationalUnitSourceType": "build_in",
      "OrganizationalUnitSourceId": "idaas_ue2jvisn35ea5lmthk267xxxxx",
      "CreateTime": 1652085686179,
      "UpdateTime": 1652085686179,
      "Description": "Test organizational unit\n",
      "InstanceId": "idaas_ue2jvisn35ea5lmthk267xxxxx",
      "Leaf": false
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.