Skip to content

Azure ​

The Azure Source connects an AI System to one or more Azure subscriptions through a service principal. Metric Tests read Azure Monitor metrics of one resource. Scout, Agent Tests, and the Risk Agent read the resources, the model deployments, the Foundry agents, and the costs.

Used byMetric Tests, Agent Tests, Scout, Risk Agent
ModePull
CredentialsTenant ID, client ID, and client secret of a service principal
Metric selectionSelect the resource, then the metric

Where in Modulos ​

  • AI System → Settings → Sources → Add Source → Azure adds the Source.

Before you start ​

An Organization Admin makes Azure available. See Source & Connectors.

How to create the service principal ​

Do these steps in the Azure portal:

  1. In Microsoft Entra ID, open App registrations.
  2. Create a registration.
  3. Copy the Directory (tenant) ID and the Application (client) ID.
  4. In Certificates & secrets, create a client secret.
  5. Copy the value of the client secret.
  6. In each subscription that Modulos must read, open Access control (IAM).
  7. Add a role assignment that gives the Reader role to the app.

Two functions of Scout, Agent Tests, and the Risk Agent have different role rules:

  • Foundry agents: create a custom role with the one data action Microsoft.CognitiveServices/accounts/AIServices/agents/read. Give it to the same app on the subscriptions. The Microsoft documentation tells you that this permission also gives access to the threads and messages of the agents.
  • Cost report: the Reader role is sufficient. If you use a custom role with less access, also give the Cost Management Reader role to the app.

How to connect Azure ​

  1. Open AI System → Settings → Sources.
  2. Select Add Source.
  3. Select Azure.
  4. Type a Source Name.
  5. Paste the tenant ID into Tenant ID.
  6. Paste the client ID into Client ID.
  7. Paste the client secret into Client Secret.
  8. Type the subscription IDs to read in Subscription IDs (Optional), with a comma between them.
  9. Select Save.
Add Source dialog with Azure selected: the connection instructions on the left, the fields on the right.
Add an Azure Source.
  1. 1
    Tenant ID
    The tenant of the service principal.
  2. 2
    Client Secret
    The secret of the service principal.
  3. 3
    Subscription IDs
    Empty: all subscriptions that the service principal can see.

Keep Subscription IDs (Optional) empty to read all subscriptions that the service principal can see. When you save, Modulos signs in as the service principal and lists its subscriptions. If the service principal sees no subscription, the Source is not saved.

Metrics for Metric Tests ​

A Metric Test on an Azure Source reads one metric of one resource:

  1. In the test dialog, select the Azure Source.
  2. Select the Subscription.
  3. If necessary, select a Resource Group to make the menu shorter.
  4. Select the Resource, for example a virtual machine, a storage account, or a database.
  5. Select the Metric.

When the test runs, Modulos asks Azure Monitor for the metric in the schedule period of the test, or the last hour if the test has no schedule, as one interval. The value is the primary aggregation of the metric in that interval, for example the average or the total. A metric gives a value only when that aggregation is Average, Total, or Count.

Scout, Agent Tests, and the Risk Agent ​

Scout, Agent Tests, and the Risk Agent read an Azure Source with read-only queries:

  • Subscriptions and resource groups that the service principal can see.
  • Resources: a query by name or type, Azure Resource Graph queries, and the properties and tags of one resource.
  • Model deployments: the model, version, SKU, capacity, and status of Azure OpenAI and Microsoft Foundry deployments.
  • Foundry agents: the agents of each Foundry project, with model, tools, and version, and the instructions of one agent. This needs the custom role above. Modulos cannot read classic projects that use a hub.
  • Costs: Cost Management data for a period of up to 365 days, grouped by one to three Cost Management dimensions, for example ServiceName, ResourceGroupName, or ResourceLocation. Scout can give one total or the cost for each day, week, or month. The costs of the last 4 days can change.

Important considerations ​

  • Give the service principal read roles only.
  • Before you give the role for Foundry agents, make sure that your organization permits access to agent threads and messages.