Skip to main content

Foundry Agent → LLM → Azure App Logic → ServiceNow


Purpose

Simulate an AI-mediated enterprise provisioning lifecycle:

Natural Language Intent → Parameter Extraction → Cross-Platform Orchestration → System of Record (SoR) Entry.

Used to test the ability to trace:

  • LLM Tool Selection: Ability to map fuzzy intent to a specific REST action.
  • Parameter mapping: Extraction of UPN from unstructured chat.
  • Middleware execution: Logic App as a serverless bridge.
  • ITSM Integration: Deterministic creation of records in ServiceNow.
  • Connectivity Handshake: Authenticated REST egress via signature-based URI.

Components

1. Microsoft Foundry Agent (The Brain)

Model: gpt-4o or gpt-5-pro (Action-capable models).

System Prompt:

"You are an IT Ops Assistant. When users request access or provisioning, you must use the ProvisionUser tool. Extract the email address (UPN) from the request. If missing, ask the user."

2. Custom Action: ProvisionUser (The Contract)

Registered as an OpenAPI 3.0 tool within the Foundry Project.

Endpoint: POST https://prod-28.eastus.logic.azure.com:443/workflows/.../invoke?sig=nJ8zeMuB3bccIEflw8nHaUDnIpa9ymXIf-Lvuj5iLqo

Payload Schema:

JSON

{ "upn": "string" }

3. Azure Logic App (The Bridge)

Trigger: HTTP Request (Manual).

Logic:

  1. Parse JSON: Extract upn.
  2. ServiceNow Connector: Initialize connection to PDI.
  3. Action: Create Record in incident table.

Response: 202 Accepted returned to Foundry.

4. ServiceNow (System of Record)

Table: incident

Record Mapping:

  • Short Description: AI Provisioning Request: <upn>
  • Description: Request initiated via Microsoft Foundry Agent. Provisioning workflow started for user identity: <upn>
  • Category: Request
  • State: New (or as defined in the Logic App step)

Autonomous Execution Characteristics

This scenario demonstrates:

  • Unstructured Trigger: Initiated via Natural Language rather than a form.
  • Deterministic Logic: The Bridge (Logic App) ensures the ServiceNow record is created exactly as defined.
  • Zero-Trust Auth: Uses a SAS-signed URL (sig) for secure egress from Foundry to Azure.
  • Stateful Visibility: The transaction is visible in Foundry Traces, Azure Run History, and ServiceNow Incident lists.

Execution Path (High-Level)

Foundry Agent Playground (User Prompt)

Model Reasoning (Identifies Intent + Extracts UPN)

Foundry Action (HTTP POST with SAS Token)

Azure Logic App (Workflow Trigger)

ServiceNow API (Incident Creation)

Success Response (Propagated back to Agent UI)


Test Vectors for Claude Code

To support or debug this, Claude Code should verify:

  1. Schema Alignment: Does the upn key in Foundry match the upn key expected by the Logic App JSON parser?
  2. Signature Validity: Is the sig parameter in the URL still valid and not truncated?
  3. Model Constraints: Is the deployed model in Foundry explicitly "Action-capable"?
  4. Egress Success: Does a curl to the Logic App endpoint (using the schema above) result in a ServiceNow record?

Would you like me to generate the specific "Testing Script" Claude Code can use to verify that the ServiceNow incident contains the expected "AI Provisioning" string?