> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tensorcost.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure

> Connect an Azure subscription for your cost export and Azure OpenAI usage without storing a secret.

> [!NOTE]
>
> Admin only. Open **Connect › Sources**. Cost is on the **Cloud** tab and Azure OpenAI on the **AI / LLM providers** tab.

## Cost export

Setup takes about ten minutes and involves two Azure roles: someone who can grant Entra admin consent, and a subscription owner. If those are other people, share the handoff link from the Connect page. It is valid for 14 days.

**1. Grant admin consent**

Choose **Grant admin consent** and have an Entra admin approve TensorCost's multi-tenant app. If the button is disabled, TensorCost's app isn't registered for your environment yet; ask your TensorCost contact.

**2. Deploy the template**

Choose **Deploy to Azure**. The template creates a storage account with a daily FOCUS cost export and grants two read-only roles: **Cost Management Reader** on the subscription and **Storage Blob Data Reader** on the export storage. On a brand-new subscription, first run `az provider register --namespace Microsoft.CostManagementExports`, or the deploy fails with "RP Not Registered".

**3. Paste three values and connect**

Enter the tenant ID, subscription ID, storage account and container (prefix is optional), then choose **I deployed, connect**.

No client secret is stored on either side. TensorCost checks the connection by confirming it can read the export container, and refuses to connect if it can't.

## Azure OpenAI

Add Azure OpenAI as an AI provider with its endpoint URL, then either an API key and API version, or a service principal with tenant, client, secret, subscription, resource group and account name. The service principal needs **Monitoring Reader** and **Cognitive Services Usages Reader**.

Usage is read from Azure Monitor metrics every 10 minutes, per deployment, and priced from list prices. An optional Cost Management export adds billed cost once a day.

## What appears and when

| Data | Cadence |
| - | - |
| Azure OpenAI metrics | Every 10 minutes |
| Cost export | Daily around 07:00 UTC |
| Azure OpenAI Cost Management export | Daily around 06:30 UTC |

Expect the first cloud cost the next morning, and often up to 48 hours.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.