canonical: https://jentic.com/apis/azure.com/subscriptiondefinitionsclient

# Microsoft Azure SubscriptionDefinitionsClient

Jentic publishes the only available OpenAPI specification for SubscriptionDefinitionsClient, keeping it validated and agent-ready. The Subscription Definitions client exposes a programmatic interface to create, retrieve, and list Azure subscription definitions, plus a long-running-operation status endpoint. It is part of the Microsoft.Subscription resource provider and is intended for tenants and CSPs that automate subscription provisioning at scale. Use it to script subscription creation flows that previously required manual portal steps.

## For AI agents

Create, list, and retrieve Azure subscription definitions and check the status of asynchronous subscription creation operations.

## Scope

Does not list offers, manage billing, or delete subscriptions - use for Azure subscription definition creation, listing, retrieval, and operation status polling only.

## Capabilities

- Create a new Azure subscription definition by name
- List every subscription definition in the calling tenant
- Retrieve a specific subscription definition and its current state
- Poll the status of an asynchronous subscription creation operation
- Discover the operation metadata exposed by the Microsoft.Subscription provider

## Use cases

### Automated Subscription Provisioning

Enterprises and CSPs that onboard new business units or customers regularly need to spin up Azure subscriptions programmatically. SubscriptionDefinitionsClient supports create-by-PUT on /subscriptionDefinitions/{name} with the offer and billing context, returning a long-running operation id. A provisioning service polls /subscriptionOperations/{operationId} until completion, then hands the new subscription to downstream automation.

Example prompt: Call PUT /providers/Microsoft.Subscription/subscriptionDefinitions/contoso-prod with the offerType and target tenant id, then poll the returned operation id every 30 seconds until status is Succeeded.

### Subscription Inventory Across the Tenant

Finance and operations teams need an authoritative list of subscription definitions created in a tenant - both successful and in-flight. SubscriptionDefinitionsClient supports SubscriptionDefinitions_List for a full inventory and SubscriptionDefinitions_Get for a single record. Combined with billing data, this drives chargeback reports and licence audits.

Example prompt: List every subscription definition in the tenant and emit a CSV of name, state, and offerType.

### Operation Status Tracking

Subscription creation is asynchronous, returning an operation id that may take minutes to complete. SubscriptionDefinitionsClient exposes /subscriptionOperations/{operationId} so a provisioning workflow can poll status without re-issuing the create request, which would risk duplicate subscriptions. This enables idempotent automation.

Example prompt: Poll GET /providers/Microsoft.Subscription/subscriptionOperations/abc-123 every 30 seconds until status is Succeeded or Failed and emit the final result.

### Agent-Driven Subscription Creation via Jentic

An AI agent supporting a CSP back office can create new subscriptions on demand. Through Jentic, the agent searches by intent, loads the SubscriptionDefinitions_Create operation schema, and submits the request. Jentic isolates the Azure AD credential and surfaces only the operation id and final status to the agent.

Example prompt: Use Jentic to load the SubscriptionDefinitions_Create operation, then create a subscription definition 'tenant-onboarding-2026-q2' with the supplied offerType and tenant id.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /providers/Microsoft.Subscription/operations | List operations exposed by the resource provider |
| GET | /providers/Microsoft.Subscription/subscriptionDefinitions | List subscription definitions in the tenant |
| GET | /providers/Microsoft.Subscription/subscriptionDefinitions/{subscriptionDefinitionName} | Retrieve a subscription definition by name |
| PUT | /providers/Microsoft.Subscription/subscriptionDefinitions/{subscriptionDefinitionName} | Create a subscription definition |
| GET | /providers/Microsoft.Subscription/subscriptionOperations/{operationId} | Get the status of a long-running subscription operation |

## Key resources

- **Subscription Definitions** — Create, list, and retrieve subscription definitions in the tenant
- **Subscription Operations** — Poll long-running subscription creation operations by operation id
- **Operations Metadata** — List the operations exposed by Microsoft.Subscription

## Why Jentic

- **Setup:** Wiring SubscriptionDefinitionsClient by hand means setting up Azure AD OAuth 2.0 against management.azure.com, pinning the 2017-11-01-preview api-version, and writing the asynchronous polling loop over subscriptionOperations plus ARM retry handling before you can create a subscription definition. Through Jentic you install once, import SubscriptionDefinitionsClient from the API Directory, store the Azure AD OAuth token once, and your agent calls it.
- **Permission scoping:** The subscription definition name and operation id sit in the URL path (/providers/Microsoft.Subscription/subscriptionDefinitions/{subscriptionDefinitionName} and /subscriptionOperations/{operationId}). You choose the operations it may call, so a create via PUT is not included unless you add it and the agent can be held to listing definitions and polling operation status.
- **Credential handling:** Your Azure AD OAuth token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create an Azure subscription definition' or 'check the status of a subscription creation operation', and Jentic returns the matching operation with its input schema so the agent submits the create or status call without reading the ARM reference.

## Related APIs

- **SubscriptionClient** — List public and delegated-provider offers used as input to subscription creation
- **SubscriptionsManagementClient** — Azure Stack admin-side subscriptions management
- **SqlManagementClient** — Manage Azure SQL Database resources within freshly created subscriptions

## FAQ

### Why is there no official OpenAPI spec for SubscriptionDefinitionsClient?

Microsoft Azure publishes Swagger fragments for the Microsoft.Subscription resource provider but does not publish a consolidated, validated OpenAPI 3 spec for the subscription definitions surface. Jentic generates and maintains this spec so that AI agents and developers can call SubscriptionDefinitionsClient via structured tooling. It is validated against the live Azure Resource Manager API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the SubscriptionDefinitionsClient use?

All endpoints require Azure Active Directory OAuth 2.0, declared as the azure_auth security scheme with the user_impersonation scope against https://login.microsoftonline.com. Through Jentic, Azure tokens are held in the vault and injected at call time so the agent never sees the raw bearer token.

### Can I create an Azure subscription with this API?

Yes. PUT /providers/Microsoft.Subscription/subscriptionDefinitions/{subscriptionDefinitionName} creates a new subscription definition. The call is asynchronous and returns an operation id; poll GET /providers/Microsoft.Subscription/subscriptionOperations/{operationId} until status is Succeeded.

### What are the rate limits for the SubscriptionDefinitionsClient?

Calls go through Azure Resource Manager, which throttles writes per subscription (typically 1,200 writes per hour). Subscription creation is intrinsically slow; do not retry the PUT call on timeout - instead poll the returned operation id.

### How do I create an Azure subscription through Jentic?

Run pip install jentic, search Jentic for 'create an azure subscription definition', load the SubscriptionDefinitions_Create operation, and execute it with subscriptionDefinitionName and the body containing offerType and tenant id. Jentic returns the operation id; call the status operation to poll completion.

### Does this API let me browse available offers?

No. Browse offers with SubscriptionClient (GET /offers and GET /delegatedProviders/{id}/offers). Once you have the offer identifier, pass it into a SubscriptionDefinitions_Create call here.

### Can I limit what my agent is allowed to do with the Microsoft Azure Subscription Definitions Client API?

Yes. Because you run Jentic One yourself, your own rules decide which of this API's operations the agent may call, so you can withhold the PUT that creates a subscription definition and hold the agent to read-only calls such as listing definitions, retrieving a definition by name, and polling subscription operation status. Your Azure AD OAuth token is stored by your own instance and injected at call time, so the agent never sees the raw credential. Grant the create operation only when you want the agent to provision new subscriptions.
