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
ProvisionUsertool. 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:
- Parse JSON: Extract
upn. - ServiceNow Connector: Initialize connection to PDI.
- Action:
Create Recordinincidenttable.
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:
- Schema Alignment: Does the
upnkey in Foundry match theupnkey expected by the Logic App JSON parser? - Signature Validity: Is the
sigparameter in the URL still valid and not truncated? - Model Constraints: Is the deployed model in Foundry explicitly "Action-capable"?
- Egress Success: Does a
curlto 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?