# Commitments

> See your Azure reservations and savings plans with their utilization, get purchase recommendations priced on your own bill, and buy or renew through LevelFour.

Source: https://docs.levelfour.ai/connectors/azure/commitments


LevelFour shows your Azure reservations and savings plans beside the commitments you already track on your other clouds: what each one covers, how much of it you use, and when it ends.

## What you get

* **Every reservation and savings plan**, with its term, scope, state and end date, and the utilization Azure measures for it.
* **Coverage**, from your amortized bill: how much of your eligible spend a commitment paid for.
* **Purchase recommendations** for reservations and savings plans. Azure sizes them on your last 30 days of usage, at its own rates. LevelFour keeps only Azure's saving as a share of the cost, and applies it to what you paid on demand over the same 30 days. A recommendation with nothing on demand on your bill shows as unavailable instead of at Azure's figure.

Money comes from your bill alone. Azure's commitment listings carry no reservation price, and a savings plan's hourly amount is a contract figure, so LevelFour reads what each commitment cost from your amortized cost data.

## Access

LevelFour can list your commitments through either of two grants:

| Grant                                                               | What LevelFour sees                                  |
| ------------------------------------------------------------------- | ---------------------------------------------------- |
| **Reservations Reader** and **Savings plan Reader**, directory-wide | Every reservation and savings plan in your directory |
| **Enrollment reader** or **Billing account reader**                 | The commitments your billing account paid for        |

The [connect command](/connectors/azure) tries the directory-wide roles, and Azure grants them only to someone with elevated access, so most runs print `Not granted` for both. If you added the billing role from [Billing data](/connectors/azure/billing-data), you need nothing more. A connection with neither shows its commitments as not readable, never as none.

To grant the directory-wide roles by hand, a Global Administrator first turns on **Access management for Azure resources** under **Microsoft Entra ID > Properties**, which gives them User Access Administrator at the tenant root. Then, in Cloud Shell:

```bash
APP_ID="$(az ad app list --display-name LevelFour --query '[0].appId' -o tsv)"
az role assignment create --assignee "$APP_ID" --role "Reservations Reader" --scope /providers/Microsoft.Capacity
az role assignment create --assignee "$APP_ID" --role "Savings plan Reader" --scope /providers/Microsoft.BillingBenefits
```

Turn the elevated access off again afterwards.

## Buying and renewing

A purchase recommendation becomes a savings you can act on, the same way an AWS purchase does: accept it, choose how it is delivered, and an organization admin releases it.

### Renewals

You can renew a reservation or savings plan through LevelFour from 30 days before it ends until 14 days after. Each daily sync asks Azure what renewing it costs now: a reservation is priced for its own SKU, region and term, and a savings plan renews at its hourly amount. The renewal buys the same term with monthly billing, sized to what you used: what you hold, scaled by the utilization Azure measured, and never more than you hold. You can pick a smaller quantity when you raise it.

Its saving is what renewing everything you hold would cost a month, less what the renewal buys, both at the price Azure quotes now. A renewal of the same size saves nothing, and buying less saves the difference.

A commitment with Azure's auto-renew turned on is renewed by Azure itself, so LevelFour does not offer a second renewal. Turn auto-renew off in Azure to renew it through LevelFour.

### Delivery

**Automated Savings**

Once an organization admin releases the purchase or renewal, LevelFour shows one command to run in [Azure Cloud Shell](https://shell.azure.com) for it. It grants the `LevelFour` service principal a built-in purchaser role, **Reservation Purchaser** for a reservation or **Savings plan Purchaser** for a savings plan, on the subscription the commitment bills to. Azure refuses custom roles for buying, so the built-in role is the narrowest grant that works. The command also assigns the same cleanup role every Azure grant carries, which lets LevelFour delete its own role assignments and nothing else.

Before buying, LevelFour checks with Azure that the role is in effect, then prices or validates the purchase again. It does not buy if Azure no longer sells it, if the price rose more than 2% above the price an admin accepted, or if someone turned on auto-renew for the commitment being renewed. Once it has bought, LevelFour removes both of its role assignments.

A grant for a renewal lasts 33 days, long enough to reach the end of the term it renews. A grant for a purchase with a buy day lasts until 72 hours past that day, and never more than 33 days. A grant for a purchase bought on release expires 72 hours after it is created. LevelFour refuses to create a grant that would expire before its buy day, and names the earliest time to create it instead. When a grant expires, LevelFour removes whatever it left in place. [Automated Savings](/connectors/azure/automated-savings#removing-access) lists the cases that need you, such as Azure refusing that removal, and where LevelFour shows the command that removes the access.

LevelFour offers this option when your Azure connection is to the directory the commitment bills in. Ask your LevelFour contact to turn on Automated Savings for Azure for your organization before choosing it.

**Manual Setup**

Buy it yourself in the Azure portal: open **Reservations** or **Savings plans**, click **Add**, and buy what the savings names, with monthly billing. For a renewal, buy it when the current term ends: a term bought sooner bills alongside the one it renews until that one ends. Buying needs the Owner, Reservation Purchaser or Savings plan Purchaser role. LevelFour matches the new commitment on its next sync.

## Confirming it worked

Your reservations and savings plans appear on the **Commitments** page after the next sync, about a day after you connect or grant access. Utilization and coverage fill in once a full day of usage lands.

## Troubleshooting

**Commitments show as not readable.**
LevelFour holds neither the directory-wide reader roles nor a billing role. Grant one of them, as [Access](#access) describes.

**Coverage reads lower than Azure's own utilization.**
The two measure different things. Utilization is how much of the commitment you used; coverage is how much of your eligible spend the commitments paid for.

**A purchase recommendation shows as unavailable.**
Your bill shows no on-demand spend for what it would cover over the last 30 days, so LevelFour has nothing to price the saving against.

**An automated purchase stops with a permissions error.**
The purchaser role was not granted, or not on the subscription the purchase bills to. Run the purchase command again as an Owner of that subscription.

**A renewal says Azure has not priced it yet.**
The next daily sync asks Azure again. A renewal Azure keeps refusing to price says why, and Manual Setup still works.

**A renewal says to renew it in the Azure portal.**
Azure bills or quotes that commitment in a currency other than USD, and LevelFour renews only commitments priced in USD.

**A renewal is refused because the commitment was not used.**
Azure measured no use of it, so a renewal would buy a term nobody uses. Let it expire.

## Next

* [Billing data](/connectors/azure/billing-data) adds the billing role that reads commitments and negotiated prices together
* [`l4 commitments`](/cli/commands/commitments) reads the same commitments from the terminal
