Skip to content

Architecture

Overview

This solution provides bi-directional integration between Azure Monitor and ServiceNow using two Logic Apps sourced from John Joyner's open-source templates.

Component Diagram

Authentication Flow

┌──────────────────┐     oauthMI API connection     ┌─────────────────┐
│  Logic App       │ ──────────────────────────────► │  Key Vault      │
│  (runs as MI)    │                                  │  itsm-kv        │
└──────────────────┘                                  └─────────────────┘
         │                                                     │
         │  MI bearer token                                    │  Returns SNOW secrets
         ▼                                                     ▼
┌──────────────────┐                           ┌──────────────────────────┐
│  Azure Monitor   │                           │  ServiceNow Table API    │
│  REST API        │                           │  Basic auth at runtime   │
└──────────────────┘                           └──────────────────────────┘

Key principle: No SPN, no user credentials, no client secrets on the Azure side.

Data Flow: Alert → SNOW Incident

  1. Azure Monitor fires an alert (Metric, Log, Activity Log)
  2. Action Group sends the alert payload (common alert schema) to Logic App 1 via HTTP POST
  3. Logic App 1 reads SNOW credentials from Key Vault using ITSM-MI
  4. Logic App 1 checks Azure Monitor Alert Processing Rules for suppression
  5. If Fired and not suppressed: POST to /api/now/table/incident → new SNOW incident
    • short_description = alert rule name + description
    • correlation_id = Azure Monitor alertId (e.g., /subscriptions/.../alerts/{guid})
    • impact / urgency / priority = mapped from Azure severity (Sev0-4)
  6. If Resolved: PATCH to /api/now/table/incident/{sys_id} → close SNOW incident

Data Flow: SNOW Close → Azure Monitor Close

  1. SNOW agent resolves the incident (state = Resolved / Closed)
  2. SNOW Business Rule detects: correlation_id starts with /subscriptions/
  3. Business Rule POSTs to Logic App 2 webhook
  4. Logic App 2 extracts the alertId from correlation_id
  5. Logic App 2 calls Azure Monitor REST API (using ITSM-MI) to close/acknowledge the alert

Severity Mapping Table

Azure SevMonitor ConditionSNOW ImpactSNOW UrgencySNOW Priority
Sev0Critical1 – High1 – High1 – Critical
Sev1Error1 – High2 – Medium2 – High
Sev2Warning2 – Medium2 – Medium3 – Moderate
Sev3Informational3 – Low3 – Low4 – Low
Sev4Verbose3 – Low3 – Low5 – Planning

Key Vault Secrets

Secret NameValuePurpose
ItsmApiIntegrationCodehttps://{instance}.service-now.comSNOW instance base URL
ItsmApiUserNameSNOW service account usernameBasic auth credential
ItsmApiSecretSNOW service account passwordBasic auth credential

ITSM-MI RBAC Assignments

RoleScopePurpose
ReaderSubscriptionRead alert target resources
Monitoring ContributorSubscriptionUpdate alert states
Key Vault Secrets UserKey Vault (itsm-kv)Read secrets at runtime

Logic App ARM Templates

Both Logic Apps are deployed from John Joyner's open-source ARM templates:

Both templates are stored in src/arm/ and deployed as nested deployments from Bicep and Terraform.

The Logic Apps deploy in Disabled state (John's zero-trust design). Run Enable-LogicApps.ps1 after all prerequisites are configured.

Based on John Joyner's Logic App ITSM guide.