View your Alibaba Cloud account ID
Alibaba Cloud assigns a unique 16-digit identifier to every account, such as 0123456789012345. This identifier is the account ID (also called Account ID or UID). It determines resource ownership, billing, and permission boundaries across your Alibaba Cloud resources, and is essential for automated O&M, permission management, and cross-account collaboration.
The account ID identifies your account. Although it is not confidential information like a password or an AccessKey, use and share it with caution.
Use cases
Common scenarios that require an account ID:
-
Billing analysis: Billing reports use fields like
ResourcePurchaseAccountIdandResourceOwnerAccountIdto attribute costs by account. -
Call cloud product API calls : Cross-account OpenAPIs require the account ID as a parameter, such as
OwnerIdorOwnerAccount. -
Cross-account resource access: Shared VPCs and VPC peering connections use the account ID to identify the authorized party.
-
Cross-account authorization with Resource Access Management (RAM): Specify the target account ID in the
Principalfield of an access policy to grant cross-account permissions. -
Alibaba Cloud Resource Name (ARN) construction: ARNs include the account ID to locate resources across all regions.
-
ECS instance ARN:
acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId} -
OSS bucket ARN:
acs:oss:<region>:<account-id>:<relative-id>
-
Find your account ID
Find your account ID in the console or via an OpenAPI. The information displayed varies by sign-in identity: Alibaba Cloud account, RAM user, or RAM role.
Console
Hover over your profile picture in the upper-right corner of the console. The displayed ID depends on your sign-in identity.
Alibaba Cloud account logon
Log on to the console with your Alibaba Cloud account. Hover over your profile picture in the upper-right corner to see your Account ID.

RAM user
Log on as a RAM user and hover over your profile picture in the upper-right corner. The parent account ID is displayed as Main Account ID.

RAM role
Assume a RAM role and hover over your profile picture in the upper-right corner. The parent account ID is displayed as Main Account ID.

OpenAPI
Call the GetCallerIdentity API to get the current caller's account ID. The response JSON includes identity information; the AccountId field contains the Alibaba Cloud account ID. Key response fields by caller identity:
|
Key API response field |
Alibaba Cloud account |
RAM user |
RAM role |
|
IdentityType |
Account |
RAMUser |
AssumedRoleUser |
|
AccountId |
Your account ID |
ID of the parent Alibaba Cloud account |
ID of the parent Alibaba Cloud account |
|
UserId / RoleId |
Same as AccountId |
ID of the RAM user |
ID of the RAM role |
|
PrincipalId |
Same as AccountId |
Same as UserId |
RoleId:SessionName |
Comparison of account ID and login name
An account ID is a permanent, system-generated identifier for programmatic access and resource attribution. A login name is a mutable credential (email or alias) used only for console login.
Key differences:
|
Item |
Account ID |
Login name |
|
Nature |
Identity identifier |
Login credential |
|
Format |
A unique, system-generated 16-digit number string |
The email address or a custom alias that you use to log in |
|
Mutability |
Cannot be changed |
Can be changed; changing the login name does not affect the account ID |
|
Purpose |
Programmatic identification, access policies, API calls, and billing attribution |
Used only for logging in to the console |
When writing automation scripts, code, or access policies, you must use the static account ID to identify an account. Do not use the login name, because it can be changed and is not a reliable identifier for programmatic tasks.
FAQ
How do I confirm whether a UID belongs to the current primary account or has an association with it?
For privacy protection, Alibaba Cloud does not support reverse lookup of account ownership information by UID. You can verify ownership through the following methods:
-
Check the enterprise name or real-name verification information bound to the account.
-
If you need to confirm cross-account associations, such as RAM authorization or VPC peering connections, check the
Principalfield in access policies or review the shared resource list to see whether it contains the UID.
I forgot my login email or primary account. How can I retrieve it using a UID?
For security reasons, Alibaba Cloud does not support directly querying a complete login email address using a UID. You can try the following approaches:
-
Check within your organization to identify email addresses that may have been used to register the account. Then use the Forgot Password function. The system displays a masked email hint (for example,
t*na.w*@example.com) to help you determine whether it is the target account. -
Check historical bills, contracts, or system notification emails for any recorded account information that may serve as a clue.