Azure Virtual Machine
The Azure Virtual Machine Input component collects list of virtual machines and their metrics and metadata from Azure subscriptions using the Azure Resource Manager API.
Sync Type: Full Sync
Details
The Microsoft Azure Virtual Machine input ingests list of all the virtual machines which belongs to a particular subscription with their metadata from the Azure Resource Manager API.
Requirements
Before setting up the Microsoft Azure Virtual Machine input, you need to:
- Have a Microsoft Account with an active Azure Subscription.
- Register a new Application in App Registrations in Azure Entra ID portal.
- Make sure this new application has the following permissions -
- Microsoft Graph - User.Read
- Azure Service Management - user_impersonation
Required Permissions for managed identity
The service principal or managed identity requires the following Azure RBAC permissions:
Microsoft.Compute/virtualMachines/readMicrosoft.Compute/virtualMachines/instanceView/readMicrosoft.Resources/subscriptions/resourceGroups/read
Minimum role assignment: Reader role on the subscription or resource group scope.
Setting up API Access
- Registering a new application
- Open the App Registration page in the Azure Entra ID portal.
- Select New Registration.
- Add a name to the new registration.
- Click Register.
- Save the applications
Application (client) IDandDirectory (tenant) ID. - Select Certificates and Secrets.
- Click link next to Client credentials.
- In "Client secrets" click "New client secret".
- Add a name and expiration to the new secret.
- Save the client secret value.
- Give application access to Microsoft Graph API
- Click "API Permissions" on left sidebar.
- Click "Add Permission".
- Select "Microsoft Graph API".
- Select "User".
- Select "User.Read".
- Give application access to Azure Service Manangement
- Click "Add Permission".
- Select "Azure Service Management".
- Select "user_impersonation".
- On the API permission page, click on "Grant admin consent for Default Directory".
- Grant access to your User
- Navigate to Subscriptions.
- Select the active Subscription.
- Click "Access control (IAM)" on the left menu.
- Select "Add Role Assignment" from the "+ Add" menu.
- Select the
Readerrole and click Next. - Click "Select members".
- Search for the new application name and click Select.
- Click "Review + assign".
- Confirm by clicking "Review + assign".
Configuration
Settings
| Setting | Type | Required | Description |
|---|---|---|---|
| Tenant ID | string | true | The tenant ID of the Azure AD application |
| Subscription ID | string | false | The subscription ID of the Azure subscription |
| cron | string | Yes | Cron schedule for periodic alert collection (e.g., "0 */1 * * *" for every hour) |
Secrets
| Setting | Type | Required | Description |
|---|---|---|---|
| Client ID | string | true | The client ID of the Azure AD application |
| Client Secret | string | true | The client secret of the Azure AD application |
Related Articles
Sample Record
Code
Sync frequency
This input runs on a cron schedule (default hourly, 0 * * * *), which you can configure on the pipeline. See Input Sync Frequency for details.