Subscriptions - Get

Gets details about a specified subscription.

GET https://management.azure.com/subscriptions/{subscriptionId}?api-version=2022-12-01

URI Parameters

Name In Required Type Description
subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

Responses

Name Type Description
200 OK

Subscription

OK - Returns information about the subscription.

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

GetASingleSubscription

Sample request

GET https://management.azure.com/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05?api-version=2022-12-01

Sample response

{
  "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05",
  "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05",
  "tenantId": "31c75423-32d6-4322-88b7-c478bdde4858",
  "displayName": "Example Subscription",
  "state": "Enabled",
  "subscriptionPolicies": {
    "locationPlacementId": "Internal_2014-09-01",
    "quotaId": "Internal_2014-09-01",
    "spendingLimit": "Off"
  },
  "authorizationSource": "Bypassed",
  "managedByTenants": [
    {
      "tenantId": "8f70baf1-1f6e-46a2-a1ff-238dac1ebfb7"
    }
  ],
  "tags": {
    "tagKey1": "tagValue1",
    "tagKey2": "tagValue2"
  }
}

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

ManagedByTenant

Information about a tenant managing the subscription.

spendingLimit

The subscription spending limit.

Subscription

Subscription information.

SubscriptionPolicies

Subscription policies.

SubscriptionState

The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted.

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.

ManagedByTenant

Information about a tenant managing the subscription.

Name Type Description
tenantId

string

The tenant ID of the managing tenant. This is a GUID.

spendingLimit

The subscription spending limit.

Name Type Description
CurrentPeriodOff

string

Off

string

On

string

Subscription

Subscription information.

Name Type Description
authorizationSource

string

The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy, RoleBased'.

displayName

string

The subscription display name.

id

string

The fully qualified ID for the subscription. For example, /subscriptions/8d65815f-a5b6-402f-9298-045155da7d74

managedByTenants

ManagedByTenant[]

An array containing the tenants managing the subscription.

state

SubscriptionState

The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted.

subscriptionId

string

The subscription ID.

subscriptionPolicies

SubscriptionPolicies

The subscription policies.

tags

object

The tags attached to the subscription.

tenantId

string

The subscription tenant ID.

SubscriptionPolicies

Subscription policies.

Name Type Description
locationPlacementId

string

The subscription location placement ID. The ID indicates which regions are visible for a subscription. For example, a subscription with a location placement Id of Public_2014-09-01 has access to Azure public regions.

quotaId

string

The subscription quota ID.

spendingLimit

spendingLimit

The subscription spending limit.

SubscriptionState

The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted.

Name Type Description
Deleted

string

Disabled

string

Enabled

string

PastDue

string

Warned

string