> ## Documentation Index
> Fetch the complete documentation index at: https://silmaril.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft Foundry and Azure AI gateway

> Configure model and tool boundaries for Microsoft Foundry workloads in Azure API Management.

Use Azure API Management as the connection point between your Foundry workloads and Silmaril. Route model and remote MCP traffic through the gateway so checks happen before execution and before responses reach the agent.

## Before you start

Get your Firewall endpoint, credentials and Azure connection configuration through [deployment access](https://silmaril.dev/docs/start/access.md). You will also need access to your Foundry project and the API Management instance that owns the model and tool routes.

| Setting | What to prepare |
| - | - |
| Workload | Foundry agent type, model endpoints and tool connections. |
| Gateway | API Management tier, region, routes and existing policies. |
| Identity | Managed identities, Microsoft Entra authentication and secret storage. |
| Network | Connectivity from the gateway to your Firewall endpoint. |
| Responses | Buffering, body-size limits and request timeouts. |

## Set up the connection

**1. Choose the protected routes**

Identify the model APIs and remote MCP servers used by your agents. Keep their authentication and routing policies together in API Management.

**2. Apply your connection configuration**

Use the Azure configuration supplied with your Silmaril deployment to connect the selected request and response boundaries to Firewall. Store credentials in your Azure secret store and start in observation mode.

**3. Verify and enable enforcement**

Send a model request and a tool call. Check their findings, then test a blocked request and response before enabling enforcement on the selected routes.

## Model and tool boundaries

| Boundary | Check |
| - | - |
| Model request | User input before the provider runs. |
| Model response | Generated content before the application receives it. |
| Tool call | Tool name and arguments before execution. |
| Tool result | Returned content before the agent consumes it. |

Keep the model and tool routes in your connection configuration aligned with the paths your agents use. Application-owned calls can also use a [framework integration](https://silmaril.dev/docs/integrations/frameworks.md) or [SDK](https://silmaril.dev/docs/start/quickstart.md).

## Operate the connection

Use observation mode to review findings and latency. Enable enforcement once request and response checks behave as expected. Keep the previous gateway policy revision for rollback, and verify both boundaries after a policy or model-route change.

See [Microsoft's AI gateway documentation](https://learn.microsoft.com/en-us/azure/api-management/genai-gateway-capabilities) for API Management capabilities and service-tier settings.

## Next steps

[Verify your integration](https://silmaril.dev/docs/start/verify.md), then review [findings](https://silmaril.dev/docs/operate/findings.md) and [modes and enforcement](https://silmaril.dev/docs/guides/enforcement.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.