← back to broadcast

Checking Your Azure Cognitive Services Tier

A small Azure CLI check for a useful subscription detail.

The portal is useful. The command line is repeatable.

Azure Cognitive Services subscriptions have quota tiers that affect available capacity and upgrade eligibility. The current tier can be read directly from Azure Resource Manager without navigating the portal or exposing an API key.

The script

#!/usr/bin/env bash
set -euo pipefail

API_VERSION="2025-10-01-preview"
SUBSCRIPTION_ID="${1:-$(az account show --query id -o tsv)}"

URL="https://management.azure.com/subscriptions/${SUBSCRIPTION_ID}/providers/Microsoft.CognitiveServices/quotaTiers?api-version=${API_VERSION}"

az rest --method get --url "$URL" \
  --query "value[].properties.currentTierName" \
  --output tsv

Run it

Authenticate with Azure CLI, then run the script without arguments to use the active subscription:

az login
./cog-tier.sh

To query another subscription, pass its ID explicitly:

./cog-tier.sh <subscription-id>

What it returns

The query selects properties.currentTierName, so the output is the actual subscription tier rather than the resource name:

Tier 1

This uses the Azure Resource Manager quotaTiers endpoint with a preview API version. Review the API version before building long-lived production automation.