For organisations already running on Azure, building AI features inside the same cloud has obvious appeal: existing contracts, Entra ID identity, private networking, compliance controls and familiar monitoring. Microsoft's platform for this has gone through several names, from Azure OpenAI Service to Azure AI Studio to Azure AI Foundry, and since late 2025 it is called Microsoft Foundry.
The rename reflects a broader scope. Foundry is now a multi-model platform. Alongside OpenAI's models, its catalog includes models from Anthropic, Meta, Mistral AI, DeepSeek, xAI, Cohere and others, and Anthropic's Claude models became generally available in Foundry in 2026. This article explains the main building blocks and how to put them together into a production application.
What Microsoft Foundry provides
Foundry brings several capabilities together under one portal, SDK set and resource model:
- Model catalog: browse, compare and deploy models from Microsoft and partners.
- Deployments: hosted endpoints for chosen models, with quotas and pricing options.
- Agent Service: build and host agents that use tools, knowledge and other agents.
- Knowledge and retrieval: connect data sources, including Azure AI Search, for retrieval augmented generation.
- Safety: content filtering and safety evaluation through Azure AI Content Safety.
- Evaluation and observability: test quality, safety and performance; trace agent runs.
- Governance: identity, role-based access, networking and policy controls.
Developers can work through the web portal, SDKs for Python, .NET, JavaScript and Java, REST APIs and infrastructure as code.
Step 1, plan the resources
A typical setup includes:
- a Foundry resource and project for your application
- model deployments for the models you need
- Azure AI Search if you need retrieval over your documents
- storage for documents and logs
- Key Vault for any secrets that cannot be replaced with managed identity
- Application Insights and Azure Monitor for telemetry
Create separate projects or resources for development, testing and production, and define them with Bicep or Terraform so environments stay consistent.
Step 2, choose and deploy models
The catalog offers many options. Narrow the field by task:
- General chat and reasoning: OpenAI GPT models and Anthropic Claude models are the most common choices.
- Coding and agentic work: Claude and OpenAI's coding-capable models are strong candidates.
- Cost-sensitive, high-volume tasks: smaller models from several providers.
- Embeddings: dedicated embedding models for search and retrieval.
- Open-weight models: when you need more control or specific licensing.
Some partner models are sold and operated by Microsoft, while others are offered through partner arrangements with different billing and terms. Check each model's page for how it is hosted, billed and which regions support it.
Deployment types
Foundry offers different deployment types, such as standard pay-as-you-go deployments, global deployments that route across regions for capacity, data-zone deployments that keep processing within a geography, and provisioned throughput for predictable high-volume workloads. Choose based on data residency requirements, latency and cost predictability.
Step 3, authenticate properly
Prefer Microsoft Entra ID authentication with managed identities over API keys:
- Your App Service, Container App, Function or virtual machine gets a managed identity.
- Grant that identity the appropriate role on the Foundry resource.
- The SDK obtains tokens automatically; there is no secret to store or rotate.
API keys remain available but are easier to leak. If you use them, store them in Key Vault and rotate them regularly.
Step 4, call the model
The SDK and endpoint depend on the model family. OpenAI models in Foundry can be called with the OpenAI SDKs configured for Azure. Claude models in Foundry are called through the Claude Messages API using Anthropic's SDKs, pointed at your Foundry deployment. Microsoft also offers inference SDKs that work across many catalog models.
Wrap model calls in a small service in your application, so the rest of the code does not depend on provider details and you can switch models through configuration.
Step 5, add your data with retrieval
Most business applications need answers grounded in company data. The common pattern on Azure:
1. Store documents in Blob Storage, SharePoint or other sources.
2. Index them with Azure AI Search, using integrated vectorisation for chunking and embeddings.
3. Retrieve relevant passages with hybrid search and semantic ranking.
4. Send the passages to the model with instructions to answer from them and cite sources.
Apply security trimming so users only retrieve documents they are allowed to see. Our article on Azure AI Search for enterprise RAG covers this in detail.
Step 6, build agents when needed
For tasks that need tools and multiple steps, Foundry Agent Service hosts agents that can use knowledge sources, call functions and APIs, use MCP servers and coordinate with other agents. For code-first development, the open-source Microsoft Agent Framework for .NET and Python, the successor to Semantic Kernel and AutoGen, integrates with Foundry.
Start simple. A single model call with retrieval solves many problems; add agents only where steps genuinely need to be decided at runtime.
Step 7, apply content safety
Foundry deployments include content filtering that screens inputs and outputs for categories such as hate, violence, sexual content and self-harm, with configurable severity thresholds. Additional protections help detect prompt injection attempts and protected material.
Configure filters to suit your audience. A children's education app needs stricter settings than an internal security research tool. Document your choices and test them.
Step 8, evaluate before and after launch
Use Foundry's evaluation tools, or your own test harness, to measure:
- quality metrics such as groundedness, relevance and coherence
- task-specific accuracy against expected answers
- safety metrics on adversarial test sets
- latency and token usage
Run evaluations whenever you change prompts, models or retrieval settings. After launch, use tracing and monitoring to watch real behaviour, and add problem cases to your test sets.
Step 9, secure the network
For sensitive workloads:
- use private endpoints for Foundry, Azure AI Search and storage
- disable public network access where possible
- route outbound traffic through controlled paths
- apply Azure Policy to enforce approved configurations
Step 10, control cost
- Choose the smallest model that meets your quality bar.
- Use prompt caching where models support it by keeping stable content at the start of prompts.
- Use batch processing for non-urgent bulk work.
- Set token limits on outputs.
- Monitor spending per deployment and set budgets and alerts in Azure Cost Management.
- Consider provisioned throughput only when usage is high and steady enough to justify it.
Hosting your application
Foundry hosts models and agents; your application still needs a home. Common choices:
- Azure App Service for web applications and APIs, including ASP.NET Core and Python apps.
- Azure Container Apps for containerised services that need to scale.
- Azure Functions for event-driven processing such as document ingestion.
- AKS for complex, large-scale container platforms.
Use managed identity from the host to Foundry, Azure AI Search and storage.
Local and offline options
For scenarios that cannot send data to the cloud, Foundry Local runs supported models on local devices or servers, including disconnected environments. It suits edge devices, offline field work and strict data sovereignty requirements, with the trade-off that local models are usually smaller.
A reference flow
A typical Foundry-based assistant works like this:
1. A user sends a question to your ASP.NET Core or Python API on App Service.
2. The API authenticates the user and checks permissions.
3. It queries Azure AI Search with the user's permissions applied.
4. It calls a model deployment in Foundry with instructions, retrieved passages and the question, using managed identity.
5. Content filters screen the input and output.
6. The answer streams back to the user with citations.
7. Telemetry records latency, tokens, sources and feedback in Application Insights.
Key takeaways
- Microsoft Foundry, formerly Azure AI Foundry, is Azure's multi-model AI platform, including OpenAI and Claude models.
- Plan resources per environment and define them as code.
- Choose models and deployment types based on task, residency and cost.
- Use Entra ID with managed identities instead of keys.
- Ground answers with Azure AI Search and security trimming.
- Add agents only when needed, using Agent Service or Microsoft Agent Framework.
- Configure content safety, evaluate continuously and monitor cost.
For Azure-centred organisations, Foundry offers a governed, multi-model path from prototype to production without leaving the cloud they already trust.
Related articles on MindStick
- Azure AI Search for Building Enterprise RAG
- Securing AI Applications on Azure, Keys, Identity and Content Filters
- Microsoft Agent Framework for C# and Python, Moving Beyond Semantic Kernel
- Retrieval Augmented Generation From Scratch, A Practical Architecture
Microsoft Foundry features, model availability, regions and pricing change frequently. Check Microsoft's official documentation for current details.
Leave a Comment