- Portal deployment — a guided, beginner-friendly UI flow.
- CLI deployment — scriptable and repeatable for automation and CI/CD.
OpenAI (often referred to as an Azure OpenAI resource). After provisioning you’ll obtain the resource endpoint and keys to call the Azure OpenAI APIs or connect the resource to Azure AI Foundry (Azure AI Studio).
Quick comparison
| Deployment method | Best for | Pros | Cons |
|---|---|---|---|
| Portal (UI) | Beginners, one-off setups | Guided validation, visual configuration, easy access to AI Studio links | Manual steps, less repeatable |
| CLI / PowerShell | Automation, CI/CD, reproducible infra | Scriptable, repeatable, integrates with pipelines | Requires CLI authentication and scripting knowledge |
Portal deployment (guided)
Steps — high level:- Open the Azure portal: https://portal.azure.com
- Select your Subscription.
- Choose or create a Resource Group.
- Provide instance details: Resource name, Region, and Pricing tier.
- Complete validation and create the resource.

Creating a resource in the portal — example flow
When you create a resource you’ll typically:- Choose (or create) a resource group, e.g.,
rg-ai102-oai-eus. - Provide a resource name, e.g.,
ai102-aoai-eus. - Select a region (for example,
East US) and choose the Pricing tier (commonlyS0).

- Deployment may take several minutes.
- When complete, click Go to resource.
- From the resource overview you can copy the keys and endpoint, and open Azure AI Foundry / AI Studio for model experiments and deployments.
CLI deployment (automated)
Use Azure CLI or Azure PowerShell when you need automation or pipeline integration. Before creating resources, sign in and ensure the correct subscription is selected:- Use uppercase
S0for the--skuvalue in most cases. - This command provisions a Cognitive Services account with
kindset toOpenAI. After provisioning, retrieve keys and the endpoint from the resource overview.
Before creating an Azure OpenAI resource, ensure your account and subscription have the required permissions and quota. Some tenants require an access request or enrollment for Azure OpenAI—check your organization’s policy and request access if needed.
Post-deployment: keys, endpoints, and Azure AI Foundry
- From the resource overview you can:
- View and copy your endpoint and keys.
- Navigate to Azure AI Foundry (Azure AI Studio) for model experimentation and deployment.
- Use the endpoint and keys to authenticate and call the Azure OpenAI APIs:
- Overview and API reference: https://learn.microsoft.com/azure/cognitive-services/openai/overview
- Azure AI Studio: https://learn.microsoft.com/azure/ai-studio/
- Generate or summarize text
- Answer natural-language questions
- Assist with code generation or translation
- Integrate securely in enterprise Azure architectures
Troubleshooting tips
- If the portal shows validation errors, verify all required fields (Subscription, Resource Group, Region, Pricing tier).
- If CLI returns permission or quota errors, confirm subscription and role access, and check if Azure OpenAI access must be requested for your tenant.
- Confirm correct region availability for Azure OpenAI in your subscription.
Links and references
- Azure Portal
- Azure CLI documentation
- Azure PowerShell
- Azure OpenAI overview and API docs
- Azure AI Studio (Foundry)