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

# Microsoft Azure

> Inspect Azure subscriptions, resource groups, storage accounts, and function apps, and start or stop virtual machines via Azure Resource Manager

## At a glance

* **Availability**: Experimental ([how to enable](/cloud/integrations)).
* **Auth**: OAuth 2.0.
* **Connection**: A user authorizes the connection in the provider's consent screen.
* **Scopes**: `https://management.azure.com/user_impersonation`, `offline_access`.
* **Docs**: [https://learn.microsoft.com/en-us/rest/api/azure/](https://learn.microsoft.com/en-us/rest/api/azure/)

## Credentials

Set these per environment. See [Connect an integration](/cloud/integrations).

With a managed OAuth app, Connect works without these variables; set them to use your own OAuth app instead.

| Variable                  | Required | Description                                                                                                                               |
| ------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `MICROSOFT_CLIENT_ID`     | Yes      | Microsoft Azure App Client ID (Application ID) [Docs](https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade). |
| `MICROSOFT_CLIENT_SECRET` | Yes      | Microsoft Azure App Client Secret [Docs](https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade).              |

## Setup

1. **Get an Azure subscription**: Sign in at [https://portal.azure.com](https://portal.azure.com) with a Microsoft account. New accounts can create a free subscription with trial credit at [https://azure.microsoft.com/free](https://azure.microsoft.com/free), which is enough to test every tool in this connector.
2. **Register an Azure app**: In the Azure portal, open Microsoft Entra ID > App registrations > New registration. Choose 'Accounts in any organizational directory and personal Microsoft accounts' (or your single tenant) and add your callback URL as a Web redirect URI.
3. **Add the Azure Service Management delegated permission**: Under API permissions, select Add a permission > Azure Service Management > Delegated permissions, and add user\_impersonation. This lets the connector call Azure Resource Manager as the signed-in user.
4. **Create a client secret**: Under Certificates & secrets, create a client secret. Set MICROSOFT\_CLIENT\_ID to the Application (client) ID and MICROSOFT\_CLIENT\_SECRET to the secret value.
5. **Create test resources**: Create a resource group with a small VM (e.g. B1s) and a storage account so the list and VM power tools have something to return. Deallocate the VM when done to avoid charges.

* The signed-in user needs Azure RBAC roles on the subscription: Reader is enough for the list tools, and Virtual Machine Contributor (or Contributor) is required to start and deallocate VMs.
* Start and deallocate are asynchronous: a 202 Accepted response means the operation was queued, not that it has finished; re-run List Virtual Machines with statusOnly=true to check the power state.
* Deallocate (not just stop) releases the compute hardware so the VM stops incurring compute charges; disks continue to bill.
* Each Azure resource provider versions its API independently, which is why every tool carries its own api-version default.
* List Function and Web Apps returns all Microsoft.Web/sites resources; filter client-side on the 'kind' field (e.g. 'functionapp') to isolate function apps.

Provider API reference: [https://learn.microsoft.com/en-us/rest/api/azure/](https://learn.microsoft.com/en-us/rest/api/azure/)

## Tools

| Tool                       | Access | Description                                                                                                                                                                                         |
| -------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| List Subscriptions         | Read   | List all Azure subscriptions the signed-in user can access; use this first to get subscription IDs for the other tools                                                                              |
| List Resource Groups       | Read   | List the resource groups in an Azure subscription                                                                                                                                                   |
| List Virtual Machines      | Read   | List all virtual machines in an Azure subscription, optionally with runtime power state                                                                                                             |
| Start Virtual Machine      | Write  | Start a stopped or deallocated virtual machine (returns 202 Accepted; the operation completes asynchronously)                                                                                       |
| Deallocate Virtual Machine | Write  | Shut down a virtual machine and release its compute resources so it stops incurring compute charges (returns 202 Accepted)                                                                          |
| List Storage Accounts      | Read   | List all storage accounts in an Azure subscription (storage keys are not returned)                                                                                                                  |
| List Function and Web Apps | Read   | List all App Service sites (function apps and web apps, Microsoft.Web/sites) in an Azure subscription; function apps have kind 'functionapp'                                                        |
| Restart Virtual Machine    | Write  | Restart a running virtual machine (returns 202 Accepted; the operation completes asynchronously)                                                                                                    |
| Get VM Instance View       | Read   | Get the runtime state of a single virtual machine, including power state (statuses with code PowerState/running etc.), OS info, and boot diagnostics - cheaper than listing all VMs with statusOnly |
| List Resources             | Read   | List all resources in an Azure subscription across every resource type - a generic inventory beyond the dedicated list tools                                                                        |

## Example prompts

* List my Azure subscriptions and summarize the resource groups, virtual machines, storage accounts, and function apps in each one.
* List my Azure virtual machines with their power states and point out any running VMs that look idle or forgotten.
* Help me deallocate an Azure virtual machine so it stops incurring compute charges, and confirm the operation was accepted.
