Azure AI Gateway now has its own managed resource for model and MCP traffic, and Microsoft has documented how to move AI workloads to it from Azure API Management, with a coding agent that writes the inventory and plan and applies them in phases. Two lines in that guide decide whether the move is safe: operation-level policies aren’t collected by default, and policies attached to individual tools don’t carry over when a REST API is projected as MCP tools.
So a tool can arrive on the new endpoint with its old name while the rule that guarded it stays behind. A model alias can keep a familiar name too, while the caller identity, backend credential or operation policy changes underneath. A successful call after cutover tells me that something is connected. It doesn’t tell me that the right person can perform the right action on the right record.
This is design analysis with illustrative TypeScript. I haven’t deployed Azure AI Gateway or run the migration tool. The invoice workflow and controls below are proposed designs, not measured product behaviour.
What Microsoft describes
Microsoft describes AI Gateway as a separate product from Azure API Management, although both belong to the same product family. AI Gateway uses Microsoft.ApiManagement/aigateways; API Management uses Microsoft.ApiManagement/service. Existing AI workloads in API Management remain supported, so a new gateway does not require every business API to move.
The migration guide makes the translation problem explicit:
“Treat this mapping as a design assessment, not a direct configuration conversion.”
Microsoft Learn, Move AI workloads to AI Gateway.
That is the line I would put at the top of the migration plan. The source has APIs, operations, products and subscriptions. The target has providers, registered models, aliases and federated MCP servers with tools. The object names are not a one-to-one security specification.
The guide also describes an agent-driven plugin. It writes an inventory and an editable plan, rehearses phases, and applies them when explicitly executed. Microsoft says the migration is additive: it provisions into the target but does not remove the source configuration. A failed apply can leave a partially built target. The guide says credentials are represented by references and resolved when applied, rather than written as values into the artefacts. I would still restrict access: resource names, identities and retrieval instructions can describe sensitive infrastructure even when secret values aren’t present. A completed provisioning phase is not evidence that callers have been safely cut over.
A release-status detail matters here. Microsoft’s model-router documentation says AI Gateway is generally available, while automatic model selection through gateway aliases is in preview. I would evaluate the product and that optional feature separately rather than describing every routing capability as generally available.
The running example: an invoice agent
Imagine an internal invoice assistant that calls a model to extract fields and uses two tools: find_invoice and issue_credit. The first reads an invoice. The second changes a financial record and needs an approval for the exact action. This is an invented workflow, not a description of a system I operate.
The old API Management setup exposes the tools to a support application. An operation-level policy restricts issue_credit, and the finance backend checks the tenant and the staff member’s authority. The proposed target publishes those tools through a federated MCP endpoint and keeps a stable model alias for extraction.
Before moving traffic I would write down the full chain: who calls the gateway, what that caller can discover and invoke, which identity the gateway uses at the finance service, and where the tenant and approval are checked. If any part is unknown, the plan isn’t ready for that tool. A migrated tool name is not the chain.
The authority map
I would use a table like this for every route and tool. The last column names the evidence I want before treating a target entry as equivalent. It is my proposed migration record, not an Azure export format.
| Boundary | Source obligation | Target evidence |
|---|---|---|
| Caller | Only the support app can invoke the route | Exact caller and role tested |
| Model route | Extraction uses the approved API and model contract | Alias, provider and format tested |
| Tool catalogue | find_invoice and issue_credit are explicitly selected |
Target list compared with source |
| Action policy | Credit requires a valid, action-bound approval | Independent policy check tested |
| Backend identity | Finance service receives the intended authority | Credential scope and identity verified |
| Tenant boundary | A caller cannot access another tenant’s invoice | Cross-tenant denial tested |
| Accounting | Credit is posted once and reconciled | Backend idempotency and record checked |
A catalogue allowlist can keep an unwanted tool out of the published set. It does not establish that every permitted invocation is authorised for every argument. For issue_credit, the finance service still needs to verify the tenant, invoice, amount and approval. I would test both the calls the source was meant to allow and the calls it was meant to deny. If an argument-level decision has no equivalent enforceable check in the target path, keep that operation behind the old API until one exists.
Microsoft’s migration guide says operation-level policies are not collected by default. It also says that policies attached to individual tools do not carry over when a REST API is projected as MCP tools; the guide suggests re-expressing them with allow and block lists, or keeping them in API Management. A list of tool names cannot reproduce every possible argument-dependent policy. I would inspect the actual source rule before deciding which of those options preserves it.
The inventory’s coverage matters as much as the list of objects. Microsoft says failed reads are unknowns, not absences, and low-confidence detections need review. An empty policy list after a permission failure is not proof that no policy exists. I would mark each unknown with an owner and recollect it before cutover.
Three identities, not one
Microsoft’s concepts documentation distinguishes the administrator configuring a gateway, the caller accessing its runtime endpoint, and the gateway authenticating to a backend. Those are different permissions. The same page notes that runtime API keys grant gateway-wide access, while a shared backend connection causes authorised callers to use the connection’s permissions.
For the invoice agent, a successful runtime key check should not be the last decision. If a shared backend credential can issue credits for every tenant, the finance service needs a trustworthy way to determine which caller and tenant the request represents and whether that principal has approval. Otherwise a narrow-looking gateway endpoint can lead to a much broader backend identity.
I would prefer a scoped caller identity where the configured system supports it, and a narrowly scoped backend identity. Then I would verify how identity and claims reach the business service. If the gateway or backend cannot establish a trustworthy end-user context for the operation, keep the action behind a service that can make the decision, or do not expose it. I haven’t tested a particular Microsoft authentication configuration, so this is a requirement to verify, not a claim about one deployed setup.
A tool server’s description cannot supply that authority. The agent may request a credit; application code and the finance service decide whether the request is permitted. That is the same boundary I described in approval as a capability, applied to a migration rather than a new approval flow.
Bind the action before it crosses
Here is the information I would expect an application-owned authorisation service to bind for issue_credit. This is illustrative TypeScript, not an Azure policy or SDK. It is unrun and omits cryptographic verification and storage.
type CreditIntent = {
tenantId: string;
invoiceId: string;
amountMinor: number;
currency: string;
requestId: string;
};
type Approval = {
intentDigest: string;
requesterId: string;
approverId: string;
expiresAt: number;
};
type Decision =
| { kind: "allow"; intentDigest: string }
| { kind: "deny"; reason: string };
A trusted service would authenticate the caller, derive the tenant from trusted identity, canonicalise the proposed intent, and verify that a different authorised principal approved that exact digest. It would check expiry, current authority and whether the invoice belongs to the tenant. The finance backend must enforce the decision or perform an equivalent check at its own boundary. The model cannot mint the approval by returning an object with the right shape.
The decision also needs a consistent relationship to the write. If authorisation is revoked after a check but before the finance service posts the credit, a separate check can race the effect. The implementation needs a documented commit boundary, such as a transaction in the authoritative service or a short-lived capability with explicit revocation semantics. I would not claim instant revocation across services just because an approval has an expiry.
The request ID has another job: preserving the identity of the intended effect across a timeout. The finance service needs to implement and persist an idempotency contract. A value in this type alone does not prevent a duplicate credit, and a changed amount or invoice must not silently reuse an earlier approval.
Check the model path too
Tool authority is only one half of the migration. Microsoft documents a fixed set of inference routes in AI Gateway, including Chat Completions, Responses, embeddings and Anthropic Messages. Its migration guide says other API operations, such as audio and images, do not have a gateway route in that mapping. Those operations may need to remain on API Management or be redesigned; a stable alias does not make a missing endpoint appear.
The same guide says AI Gateway routes protocol-natively rather than translating between formats. If the old API accepted one format and translated it to another backend, I would test the caller’s actual request and response contract or retain the translating layer. A passing health check on the alias does not test streaming errors, tool-call structure or structured-output behaviour.
For the optional automatic selection preview, Microsoft says the models behind an alias must share at least one API format, and the alias offers only the formats all of them support. Adding a model that lacks Responses support can therefore remove that format from the alias. I would treat a change to the alias pool as an API contract change and run each supported caller’s tests before applying it.
Selection also has a data path. The router documentation says the gateway sends the prompt and the alias’s models to model router for ranking. Before enabling that preview, I would check whether sending that content to the ranking service is compatible with the organisation’s data handling and residency requirements. Microsoft documents the flow; I haven’t established the terms or processing boundaries for a particular deployment.
This is different from my earlier model gateway post, which focused on routing, retries and cost. Here the question is whether an existing caller’s protocol and authority survive a move between gateway products.
Prove the target before cutover
I would compare a versioned source inventory and target plan with the application owner, then run contract tests against a non-production finance backend. The test suite should include an allowed invoice read, a cross-tenant read, a credit without approval, an approval for a different amount, a revoked approver and a retry after an uncertain response. The target must reject the cases the source was meant to reject, not merely accept the happy path.
A read-only shadow comparison can help with model routing or tool discovery, provided the data handling permits it. I would not shadow issue_credit against the live finance backend: two successful writes are not a comparison. Use an isolated backend or a deliberately non-mutating test seam, and verify that the shadow identity cannot reach the production mutation path.
Microsoft’s migration is additive, so the old path can remain while the new one is being validated. That is useful for rollback, but it can also leave two paths to the same sensitive service. I would inventory both, keep their permissions under review and record which one is authoritative for each caller. Retiring old assets belongs after validation and the organisation’s change approval, not in an automatic cleanup triggered by the agent.
Cut over a small set of named callers first. Watch denied and allowed tool calls, model contract failures, latency and accounting reconciliation. Configure the telemetry destination before relying on it; Microsoft’s concepts page calls that out. Logs should capture policy and routing decisions without casually storing invoice contents or provider credentials. If the target path fails, rollback needs to preserve the original operation ID and check the finance source of record before retrying an uncertain credit.
What I’d do on Monday
- Inventory callers, routes, operation-level policies, backend identities and failed reads on the source.
- Classify each model operation as supported, translated elsewhere or staying on API Management.
- Compare the source and target tool catalogues and write down each tool’s argument-level authority check.
- Test caller, tenant and backend identity propagation with both allowed and denied requests.
- Verify approvals and idempotency at the finance service before exposing a mutating tool.
- Run representative contract tests and a small caller canary with telemetry and an owned rollback plan.
- Retire source paths only after the target and any outstanding financial effects have been reconciled.
Limitations
This is design analysis. The TypeScript and test plan are illustrative and unrun. I haven’t deployed or independently verified Azure AI Gateway, its migration plugin or any particular identity configuration.
The Microsoft documentation describes product capabilities and a migration path, not the permissions or data-handling terms of a specific customer’s system. Automatic model selection is in preview. The checks proposed here do not establish that every source policy can be expressed in the target, or that a distributed financial operation is automatically atomic.