Skip to main content

Azure OpenAI Setup Guide

This guide walks you through deploying an Azure OpenAI model using Microsoft Foundry. The deployed model powers the AI answer synthesis for your RAG retriever.

Prerequisites

  • An Azure account with an active subscription
  • Owner access to the subscription (to create a Foundry resource), or an existing Foundry resource
  • A supported region (East US 2, Sweden Central recommended for latest models)

Part A: Access Microsoft Foundry Portal

1. Navigate to the Portal

  1. Go to ai.azure.com
  2. Sign in with your Azure account credentials

2. Enable the New Foundry Experience

  1. Look for the "Try the new Foundry" toggle in the portal header
  2. Turn the toggle ON for the latest experience

Note: All links to Microsoft Foundry open whichever portal version you last used.

Part B: Create a Foundry Project

Skip this section if you already have a Foundry project.

1. Create New Project

  1. Click your project name in the upper-left corner
  2. Select "Create new project"

2. Configure Settings

SettingRecommendation
Project nameDescriptive name (e.g., "MyCompany RAG Project")
Resource groupSelect existing or create new
LocationEast US 2 or Sweden Central for GPT-4o/GPT-5
  1. Click "Create project" and wait for completion (1-2 minutes)

Part C: Deploy an Azure OpenAI Model

1. Navigate to Models

  1. Click "Discover" in the upper-right navigation
  2. Select "Models" in the left pane

2. Find Your Model

Search for or browse to your desired model:

ModelBest For
gpt-4oHigh-quality answers, production use
gpt-4o-miniCost-effective, good quality
gpt-4.1-miniLatest capabilities, cost-effective

3. Deploy the Model

  1. Click "Deploy""Custom settings"
  2. Configure:
    • Deployment name: e.g., gpt-4o-rag
    • Deployment type: Global Standard (recommended)
  3. Click "Deploy"
  4. Wait for deployment (1-5 minutes)

Part D: Get Your Endpoint and API Key

Understanding Foundry Endpoints

An Azure AI Foundry resource answers on three interchangeable host names, and all of them serve the same model-inference API. The wizard accepts any of them:

Endpoint TypeURL Pattern
Project endpointhttps://your-resource.services.ai.azure.com/api/projects/your-project
Azure OpenAI endpointhttps://your-resource.openai.azure.com/openai/v1/
Model Target URIhttps://your-resource.cognitiveservices.azure.com/openai/deployments/...

Note: Paste whichever value Foundry shows you. The wizard trims the path back to the resource URL (e.g. https://your-resource.services.ai.azure.com/) automatically.

1. Get the Endpoint URL and API Key

The quickest source is the project Home page - the panel under the welcome banner lists API key, Project endpoint, and Azure OpenAI endpoint side by side.

  1. Click "Home" in the upper-right navigation
  2. Copy the Project endpoint (or the Azure OpenAI endpoint - either works)
  3. Copy the API key from the same panel (32+ characters)

Alternatively, from the deployment details:

  1. Click "Build" in the upper-right navigation
  2. Select "Deployments" in the left pane
  3. Click the radio button (selection circle) next to the deployment to open details
  4. Copy the Project endpoint and API Key from the right-hand panel

Tip: Don't click the deployment name - that opens the Playground. Click the radio button instead.

2. Note Your Deployment Name

The deployment name (e.g., gpt-4o) is visible in:

  • The deployment list
  • The deployment details panel

Summary: Information for the Wizard

FieldExample
Display NameMy Azure OpenAI
Endpoint URLhttps://your-resource.services.ai.azure.com/
API Key(32+ character key)
Deployment Namegpt-4o

Troubleshooting

"No quota available in this region"

  • Try East US 2, Sweden Central, or West Europe
  • Request quota increase via Azure support

"Model not available"

  • Some models require registration
  • Try gpt-4o-mini which is generally available

"Must be a valid Azure endpoint"

  • The endpoint must start with https://
  • The host must be one of services.ai.azure.com, cognitiveservices.azure.com, or openai.azure.com
  • All three are valid; you do not need to convert between them

Can't find the endpoint

  • Check the project Home page panel first - it shows the API key and both endpoints
  • In Build → Deployments, click the radio button next to the deployment, not the name
  • Look in the details panel that appears on the right