你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Tenants - List

获取帐户的租户。

GET https://management.azure.com/tenants?api-version=2022-12-01

URI 参数

名称 必需 类型 说明
api-version
query True

string

要用于此操作的 API 版本。

响应

名称 类型 说明
200 OK

TenantListResult

OK - 返回租户数组。

Other Status Codes

CloudError

描述操作失败原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

GetAllTenants

Sample Request

GET https://management.azure.com/tenants?api-version=2022-12-01

Sample Response

{
  "value": [
    {
      "id": "/tenants/a70a1586-9c4a-4373-b907-1d310660dbd1",
      "tenantId": "a70a1586-9c4a-4373-b907-1d310660dbd1",
      "countryCode": "US",
      "displayName": "Test_Test_aad50",
      "domains": [
        "aad50.ccsctp.net"
      ],
      "tenantCategory": "ManagedBy",
      "defaultDomain": "aad50.ccsctp.net",
      "tenantType": "AAD"
    },
    {
      "id": "/tenants/83abe5cd-bcc3-441a-bd86-e6a75360cecc",
      "tenantId": "83abe5cd-bcc3-441a-bd86-e6a75360cecc",
      "countryCode": "US",
      "displayName": "Contoso Corp.",
      "domains": [
        "auxteststagemanual.ccsctp.net"
      ],
      "tenantCategory": "Home",
      "defaultDomain": "auxteststagemanual.ccsctp.net",
      "tenantType": "AAD"
    },
    {
      "id": "/tenants/daea2e9b-847b-4c93-850d-2aa6f2d7af33",
      "tenantId": "daea2e9b-847b-4c93-850d-2aa6f2d7af33",
      "countryCode": "US",
      "displayName": "TEST_TEST_RDV",
      "domains": [
        "rdvmohoro.ccsctp.net",
        "rdvmohoro.mail.ccsctp.net",
        "rdvmohoro.com"
      ],
      "tenantCategory": "ProjectedBy",
      "defaultDomain": "rdvmohoro.ccsctp.net",
      "tenantType": "AAD",
      "tenantBrandingLogoUrl": "logo1.logo.rdvmohoro.com"
    }
  ],
  "nextLink": "..."
}

定义

名称 说明
CloudError

资源管理请求的错误响应。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

TenantCategory

租户的类别。

TenantIdDescription

租户 ID 信息。

TenantListResult

租户 ID 信息。

CloudError

资源管理请求的错误响应。

名称 类型 说明
error

ErrorResponse

错误响应
对所有 Azure 资源管理器 API 的常见错误响应,可返回失败操作的错误详细信息。 (这也遵循 OData 错误响应格式.) 。

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

TenantCategory

租户的类别。

名称 类型 说明
Home

string

ManagedBy

string

ProjectedBy

string

TenantIdDescription

租户 ID 信息。

名称 类型 说明
country

string

租户地址的国家/地区名称。

countryCode

string

租户的国家/地区缩写。

defaultDomain

string

租户的默认域。

displayName

string

租户的显示名称。

domains

string[]

租户的域列表。

id

string

租户的完全限定 ID。 例如,/tenants/8d65815f-a5b6-402f-9298-045155da7d74

tenantBrandingLogoUrl

string

租户的品牌徽标 URL。 仅适用于“主页”租户类别。

tenantCategory

TenantCategory

租户的类别。

tenantId

string

租户 ID。 例如,8d65815f-a5b6-402f-9298-045155da7d74

tenantType

string

租户类型。 仅适用于“主页”租户类别。

TenantListResult

租户 ID 信息。

名称 类型 说明
nextLink

string

用于获取下一组结果的 URL。

value

TenantIdDescription[]

租户数组。