Azure OpenAI setup
Connect Port to OpenAI models hosted in your Azure OpenAI deployment. This guide walks you through storing your Azure OpenAI credentials and registering Azure OpenAI as an LLM provider in Port.
Prerequisites
- An active Azure subscription with Azure OpenAI Service enabled.
- An Azure OpenAI deployment with the models you want to use. You can create deployments in the Azure OpenAI Studio.
- Your Azure OpenAI API key and endpoint URL.
Step 1: Gather your Azure OpenAI configuration
Before configuring the provider, collect the following information from your Azure OpenAI deployment:
- Endpoint URL: Your Azure OpenAI endpoint (e.g.,
https://your-resource-name.openai.azure.com). - API Key: Your Azure OpenAI API key. You can find this in the Azure portal under your Azure OpenAI resource's Keys and Endpoint section.
- Deployment name: The name of your model deployment in Azure OpenAI Studio.
Step 2: Store your API key in Port secrets
Store your Azure OpenAI API key in Port's secrets system.
- In your Port application, click on your profile picture
.
- Click on Credentials.
- Click on the
Secretstab. - Click on
+ Secretand add your secret(s).
For provider-specific secret requirements and examples, see Step 2: Store API Keys in Secrets.
You can choose any names for your secrets. The examples are suggestions. Use names that make sense for your organization, and reference the exact names in your provider configuration.
For more details on managing secrets, see the Port Secrets documentation.
Step 3: Register Azure OpenAI with the Port API
Call the Create or connect an LLM provider API with validate_connection=true to test your configuration. Set provider to "azure-openai" and provide your Azure OpenAI endpoint, deployment name, and the secret name you created in Step 2.
{
"provider": "azure-openai",
"enabled": true,
"config": {
"apiKeySecretName": "azure-openai-api-key",
"endpoint": "https://your-resource-name.openai.azure.com",
"deploymentName": "your-deployment-name"
}
}
Replace your-resource-name with your actual Azure OpenAI resource name and your-deployment-name with your model deployment name.
Port uses the appropriate Azure OpenAI API version automatically. You don't need to specify the API version in your configuration.
Step 4: Validate the configuration
The validate_connection=true parameter tests your configuration by making a request to your provider. If validation succeeds, your provider configuration is saved. If it fails, check the error message for details.
For more troubleshooting steps, see the Setup & Configuration guide.
Common validation failures:
- Invalid API key: Verify your API key is correct and active in the Azure portal.
- Incorrect endpoint: Ensure the endpoint URL matches your Azure OpenAI resource's endpoint (including the resource name).
- Invalid deployment name: Verify the deployment name exists in your Azure OpenAI Studio.
- Insufficient quota: Ensure your Azure OpenAI deployment has sufficient quota allocated.
After registration
Once your provider is configured:
- Set as default: Go to Builder → Organization Settings → AI tab in the UI, or use the Change default LLM provider and model API to set your provider as the organization's default.
- Use in API calls: Pass the provider name and a supported model name in individual general-purpose AI interactions or invoke a specific agent requests.
For more information on provider selection and validation flow, see Setup & Configuration.