Tenants - List

Gets the tenants for your account.

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

URI Parameters

Name In Required Type Description
api-version
query True

string

The API version to use for this operation.

Responses

Name Type Description
200 OK

TenantListResult

OK - Returns an array of tenants.

Other Status Codes

CloudError

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

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

Scopes

Name Description
user_impersonation impersonate your user account

Examples

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": "..."
}

Definitions

Name Description
CloudError

An error response for a resource management request.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

TenantCategory

Category of the tenant.

TenantIdDescription

Tenant Id information.

TenantListResult

Tenant Ids information.

CloudError

An error response for a resource management request.

Name Type Description
error

ErrorResponse

Error response
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

TenantCategory

Category of the tenant.

Name Type Description
Home

string

ManagedBy

string

ProjectedBy

string

TenantIdDescription

Tenant Id information.

Name Type Description
country

string

Country/region name of the address for the tenant.

countryCode

string

Country/region abbreviation for the tenant.

defaultDomain

string

The default domain for the tenant.

displayName

string

The display name of the tenant.

domains

string[]

The list of domains for the tenant.

id

string

The fully qualified ID of the tenant. For example, /tenants/8d65815f-a5b6-402f-9298-045155da7d74

tenantBrandingLogoUrl

string

The tenant's branding logo URL. Only available for 'Home' tenant category.

tenantCategory

TenantCategory

Category of the tenant.

tenantId

string

The tenant ID. For example, 8d65815f-a5b6-402f-9298-045155da7d74

tenantType

string

The tenant type. Only available for 'Home' tenant category.

TenantListResult

Tenant Ids information.

Name Type Description
nextLink

string

The URL to use for getting the next set of results.

value

TenantIdDescription[]

An array of tenants.