Pillar 3: Microsoft Foundry and Azure OpenAI
In the previous two pillars, we learned about Microsoft.Extensions.AI as the AI integration foundation and Microsoft Agent Framework as the orchestration layer. But an enterprise AI application needs more than code and orchestration. It also needs a secure, scalable, and manageable cloud platform where the AI models and agents can run.
This is where the third pillar comes in: Microsoft Foundry and Azure OpenAI.
Think of the three pillars like a vehicle:
Microsoft.Extensions.AI
↓
Engine
↓
Microsoft Agent Framework
↓
Steering
↓
Microsoft Foundry + Azure
↓
Highway / Cloud
Microsoft.Extensions.AI provides the common AI abstractions, Agent Framework manages agent behavior and workflows, and Microsoft Foundry/Azure provides the enterprise infrastructure.
Why Do We Need Microsoft Foundry?
An AI agent may work perfectly on a developer's laptop, but an enterprise application has additional requirements:
- Secure deployment
- Data protection
- Identity and access control
- Network isolation
- Monitoring
- Scalability
- Model management
- Governance
- Compliance
For example, a company may not want its confidential customer or financial data sent to an unmanaged public AI service.
Azure OpenAI addresses this by providing OpenAI models through Azure's enterprise cloud environment. Microsoft Foundry then provides a unified platform for managing AI models, agents, projects, and related resources.
So the important idea is:
The Agent Framework builds the intelligence and workflow; Microsoft Foundry provides the enterprise environment in which that intelligence can safely operate.
Microsoft Foundry as the Enterprise Control Plane
Microsoft Foundry acts as a central management layer for AI workloads.
Instead of separately managing models, deployments, security, and AI resources, organizations can manage them through the Foundry ecosystem.
For .NET developers, three important responsibilities are:
Microsoft Foundry
|
+------------+------------+
| | |
Provisioning Security Scaling
| | |
Models Identity Capacity
Endpoints Networking Production
These three areas are fundamental when moving an AI application from experimentation into production.
1. Provisioning AI Models
Microsoft Foundry provides access to a large catalog of AI models from Microsoft, OpenAI, and various other model providers.
Depending on the workload, you can choose an appropriate model rather than designing your application around a single model provider.
Two important deployment approaches are:
Serverless / Model-as-a-Service
With a serverless model deployment, you don't manage the underlying GPU or virtual machine infrastructure.
Conceptually:
Your .NET Application
↓
Microsoft.Extensions.AI
↓
AI Endpoint
↓
Model
Azure manages the underlying infrastructure, while your application consumes the model through an endpoint. This is particularly convenient when you want to concentrate on application and agent development rather than GPU infrastructure.
Pricing is generally based on consumption, such as tokens, depending on the specific model and deployment.
Managed Compute
Some workloads require more control over the inference infrastructure, particularly specialized or customized models.
In this approach, the model runs on managed compute infrastructure allocated for the workload.
This gives organizations greater control over the environment and resources used for inference.
The important point is that your application architecture doesn't need to change dramatically just because the model deployment changes.
Microsoft.Extensions.AI Connects the Application to the Model
This is where the first and third pillars work together.
Your C# application can use an abstraction such as IChatClient rather than directly coupling business logic to a particular model provider.
Conceptually:
.NET Application
↓
IChatClient
↓
Microsoft Foundry / Azure OpenAI
↓
AI Model
This provides an important separation between application code and model infrastructure.
Your business logic can remain relatively stable while the underlying model or deployment can be changed when required.
2. Securing AI Applications
Security is one of the biggest differences between an AI prototype and an enterprise AI system.
An enterprise AI platform needs to protect:
- User prompts
- Model responses
- Customer information
- Business data
- API endpoints
- Credentials
- Network traffic
- Agent tools and resources
Microsoft Foundry and Azure provide multiple layers for addressing these requirements.
Data Protection
Azure OpenAI provides enterprise controls around how customer data is handled. A key principle is that customer prompts and generated outputs aren't used to train Microsoft's or OpenAI's foundation models without the applicable authorization.
This is particularly important when building applications that process sensitive enterprise information.
However, data protection should not be viewed as a single feature. Enterprise AI security requires multiple architectural layers.
Network Isolation
AI services don't necessarily have to be exposed through a public network path.
Azure networking capabilities such as Virtual Networks and Private Endpoints can be used to create private connectivity.
A simplified architecture looks like this:
.NET Microservice
|
| Private Network
↓
Azure Private Endpoint
|
↓
Azure AI / Foundry
|
↓
AI Model
This allows organizations to design architectures where communication between application services and AI infrastructure stays within controlled Azure networking boundaries rather than relying on unrestricted public connectivity.
Identity and Access Management
Hard-coding API keys into applications is a poor security practice.
Instead, Azure applications can use Microsoft Entra ID and Managed Identity.
For example:
.NET Application
↓
Managed Identity
↓
Microsoft Entra ID
↓
RBAC Permission
↓
Azure AI Resource
The application receives permission through its Azure identity rather than storing a secret directly in source code or configuration.
This fits naturally with modern .NET applications because the same identity-based approach can be used across other Azure resources.
Content Safety and Guardrails
AI applications also need protection from unsafe or malicious inputs.
Azure AI Content Safety provides capabilities for detecting and handling potentially harmful content.
AI applications may additionally need protection against threats such as:
- Prompt injection
- Jailbreak attempts
- Unsafe requests
- Malicious instructions
- Inappropriate generated content
However, it is important to understand that content safety is only one part of the security architecture. Agent applications also need application-level authorization, tool permissions, input validation, and business-rule enforcement.
3. Scaling AI Applications
A prototype may have only a few users, but an enterprise AI application may eventually process thousands or millions of requests.
The cloud platform therefore needs to handle production concerns such as:
- Capacity
- Availability
- Performance
- Traffic growth
- Model deployment
- Resource management
- Cost control
This is another reason why the cloud infrastructure is considered a separate pillar.
The Agent Framework determines how your agents work, while the cloud platform provides the infrastructure required to run those agents reliably at enterprise scale.
How the Three Pillars Work Together
The complete architecture now looks like this:
Your .NET Application
|
↓
Microsoft.Extensions.AI
AI Abstractions
|
↓
Microsoft Agent Framework
Agents + Tools + Workflows
|
↓
Microsoft Foundry / Azure
Models + Security + Infrastructure
|
↓
AI Models
Azure OpenAI / Other Models
Each layer has a different responsibility.
| Pillar | Main Responsibility |
|---|---|
| Microsoft.Extensions.AI | Connect .NET applications to AI capabilities through common abstractions |
| Microsoft Agent Framework | Build agents, workflows, state, tools, and multi-agent systems |
| Microsoft Foundry + Azure | Provide models, deployment, security, governance, and scalable infrastructure |
From AI Prototype to Enterprise AI
The real value of these three pillars becomes clear when you look at the development lifecycle.
A simple AI prototype might look like:
C# Code
↓
LLM API
↓
Response
A production enterprise AI system becomes much more comprehensive:
User
↓
.NET Application
↓
Microsoft.Extensions.AI
↓
Microsoft Agent Framework
↓
Agent / Multi-Agent
Workflows
↓
Microsoft Foundry / Azure
↙ ↓ ↘
Security Models Monitoring
↓ ↓
Azure AI Azure OpenAI
↓
Response
This architecture separates application logic, AI orchestration, and cloud infrastructure.
That separation is important because it makes the system easier to maintain, secure, test, monitor, and evolve.
The Three Pillars — Final Picture
The entire .NET AI ecosystem can now be remembered with a simple analogy:
┌─────────────────────────────────────────────┐
│ Microsoft Foundry + Azure │
│ Enterprise Cloud Infrastructure │
│ Security | Models | Governance | Scale │
└─────────────────────────────────────────────┘
↑
┌─────────────────────────────────────────────┐
│ Microsoft Agent Framework │
│ Agents | Tools | State | Workflows │
│ Multi-Agent Systems │
└─────────────────────────────────────────────┘
↑
┌─────────────────────────────────────────────┐
│ Microsoft.Extensions.AI │
│ AI Abstractions | Chat | Embeddings │
│ Middleware | AI Integration │
└─────────────────────────────────────────────┘
↑
.NET Application
The key takeaway is:
Microsoft.Extensions.AI provides the AI building blocks, Microsoft Agent Framework provides the intelligence orchestration, and Microsoft Foundry/Azure provides the secure and scalable enterprise infrastructure.
Together, these three pillars provide a foundation for building production-grade AI agents and multi-agent applications with .NET and C#.