Subscription Policy - List Policy For Tenant

Get the subscription tenant policy for the user's tenant.

GET https://management.azure.com/providers/Microsoft.Subscription/policies?api-version=2021-10-01

URI Parameters

Name In Required Type Description
api-version
query True

string

Version of the API to be used with the client request. Current version is 2021-10-01

Responses

Name Type Description
200 OK

GetTenantPolicyListResponse

Subscription tenant policy details for user's tenant.

Other Status Codes

ErrorResponseBody

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

getTenantPolicyList

Sample request

GET https://management.azure.com/providers/Microsoft.Subscription/policies?api-version=2021-10-01

Sample response

{
  "value": [
    {
      "id": "providers/Microsoft.Subscription/policies/default",
      "name": "default",
      "type": "providers/Microsoft.Subscription/policies",
      "properties": {
        "policyId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05",
        "blockSubscriptionsLeavingTenant": true,
        "blockSubscriptionsIntoTenant": true,
        "exemptedPrincipals": [
          "e879cf0f-2b4d-5431-109a-f72fc9868693",
          "9792da87-c97b-410d-a97d-27021ba09ce6"
        ]
      }
    }
  ],
  "nextLink": null
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

ErrorResponse

Describes the format of Error response.

ErrorResponseBody

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

GetTenantPolicyListResponse

Tenant policy information list.

GetTenantPolicyResponse

Tenant policy Information.

systemData

Metadata pertaining to creation and last modification of the resource.

TenantPolicy

Tenant policy.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

ErrorResponse

Describes the format of Error response.

Name Type Description
code

string

Error code

message

string

Error message indicating why the operation failed.

ErrorResponseBody

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Name Type Description
code

string

Error code

error

ErrorResponse

The details of the error.

message

string

Error message indicating why the operation failed.

GetTenantPolicyListResponse

Tenant policy information list.

Name Type Description
nextLink

string

The link (url) to the next page of results.

value

GetTenantPolicyResponse[]

The list of tenant policies.

GetTenantPolicyResponse

Tenant policy Information.

Name Type Description
id

string

Policy Id.

name

string

Policy name.

properties

TenantPolicy

Tenant policy properties.

systemData

systemData

Metadata pertaining to creation and last modification of the resource.

type

string

Resource type.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

TenantPolicy

Tenant policy.

Name Type Description
blockSubscriptionsIntoTenant

boolean

Blocks the entering of subscriptions into user's tenant.

blockSubscriptionsLeavingTenant

boolean

Blocks the leaving of subscriptions from user's tenant.

exemptedPrincipals

string[] (uuid)

List of user objectIds that are exempted from the set subscription tenant policies for the user's tenant.

policyId

string

Policy Id.