> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognigy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft Azure OpenAI

export const largeLanguageModelId_0 = undefined

export const alternative_0 = "Switch to the Chat Completions API instead before the removal date."

<a href="/release-notes/2026.10"><Badge className="version-badge" color="blue">Updated in 2026.10</Badge></a>

<Warning>
  As of Cognigy.AI 2026.6.0, the support for the Completions API for custom LLMs is deprecated. The full removal is planned for Cognigy.AI 2026.24.0. {alternative_0}
</Warning>

To start using a Microsoft Azure OpenAI model with Cognigy.AI features, follow these steps:

1. [Add a Model](#add-models)
2. [Apply the Model](#apply-the-model)

## Add Models

You can add a model using one of the following interfaces:

* [GUI](#add-models-via-gui)
* [API](#add-models-via-the-api)

### Add Models via GUI

You can add a model provided by Azure OpenAI to Cognigy.AI in **Build > LLM**. To add the model, you will need the following parameters:

<Tabs>
  <Tab title="Standard Model">
    | Parameter       | Option  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
    | --------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Connection Type |         | Select one of the following authorization methods: API Key or OAuth2.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
    |                 | API Key | Enter the [Azure API Key](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/quickstart?tabs=command-line\&pivots=rest-api#retrieve-key-and-endpoint). This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. You can use either `KEY1` or `KEY2`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
    |                 | OAuth2  | Enter the OAuth2 key. You can use any OAuth2-compliant provider. OAuth 2.0 offers more control and security than API keys by allowing specific permissions, expiring tokens, and reducing exposure through short-lived tokens instead of constant client secret use. To use this type of connection, fill in the following fields:<ul><li>**Client ID** — enter the Application (client) ID assigned to your app. This ID can be found in the Microsoft Entra admin center: go to **App Registrations**, select an app, then click **Overview**.</li><li>**Client Secret** — enter the application secret created in the **Certificates & secrets** section in the Microsoft Entra admin center: go to **App Registrations**, select an app, then click **Overview**.</li><li>**OAuth URL** — enter the URL to retrieve the access token. This URL points to the `/token` endpoint on the authorization server. The URL can have any format that returns an access token.</li><li>**Scope** — add a list of scopes for user permissions, for example, `urn:grp:chatgpt`.</li><li>**Additional Header Name** — enter the key for an additional authentication header. This key can have any format, for example, of the [OCP APIM Subscription Key](https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions).</li><li>**Additional Header Value** — enter the value for the additional authentication header.</li></ul>Cognigy.AI uses the following steps to make requests with OAuth 2.0 to an Azure OpenAI model: <ol><li>**Requesting a token.** Cognigy.AI sends an HTTP POST request to <code>OAuth URL</code> with the following parameters: <code>Client ID</code>, <code>Client Secret</code>, and <code>Scope</code>.</li><li>**Receiving the token.** The authorization server validates the request and returns an access token to Cognigy.AI.</li><li>**Using the token.** When making requests to the Azure OpenAI model, Cognigy.AI includes the received token in the request instead of using an API key.</li></ol> |
    | Resource Name   |         | Enter the [resource name](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal#create-a-resource). To find this value, go to the **Microsoft Azure** home page. Under **Azure services**, click **Azure OpenAI**. In the left-side menu, under the **Azure AI Services** section, select **Azure OpenAI**. Copy the desired resource name from the **Name** column.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
    | Deployment Name |         | Enter the [deployment name](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal#deploy-a-model). To find this value, go to the **Microsoft Azure** home page. Under **Azure services**, click **Azure OpenAI**. In the left-side menu, under **Azure AI Services**, select **Azure OpenAI**. Select a resource from the **Name** column. On the resource page, go to **Resource Management > Model deployments**. On the **Model deployments** page, click **Manage Deployments**. On the **Deployments** page, copy the desired deployment name from the **Deployment name** column.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
    | API Version     |         | Enter the [API version](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#rest-api-versioning). The API version to use for this operation in the `YYYY-MM-DD` format. Note that the version may have an extended format, for example, `YYYY-MM-DD-preview`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
    | Custom URL      |         | This parameter is optional. You can use it to route connections between your clusters and the Azure OpenAI provider through dedicated proxy servers for enhanced security. The custom URL can be any valid endpoint URL and must be complete, including any required query parameters. When you specify a custom URL, the **Resource Name**, **Deployment Name**, and **API Version** fields are ignored.<br />For versions 2025.20 and earlier, when selecting the **API key** connection type, you must use the following pattern: `https://<resource-name>.openai.azure.com/openai/deployments/<deployment-name>/<model-type>?api-version=<api-version>`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
    | API Type        |         | Select the API format for chat models. Select one of the following API options for chat models:<ul><li>**Chat Completion** — uses the [Chat Completions API](https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/chatgpt). This option is selected by default.</li><li>**Responses** — uses the [Responses API](https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/responses).</li></ul> For more information, refer to the [Microsoft Azure OpenAI](https://learn.microsoft.com/en-us/azure/foundry/foundry-models/concepts/models-sold-directly-by-azure?tabs=americas%2Caz-global-standard%2Cglobal-standard\&pivots=azure-openai) documentation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
  </Tab>

  <Tab title="Custom Model">
    | Parameter       | Option  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
    | --------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Model Type      |         | Select one of the following options:<ul><li>**Chat** — lets you use either the [Chat Completions API](https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/chatgpt) or [Responses API](https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/responses) for chat models.</li><li>**Completion** — uses the Completions API.</li><li>**Embedding** — uses the Embedding API.</li></ul>For more information, refer to the [Azure OpenAI](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models) documentation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
    | Model Name      |         | Enter the ID of the model that you want to use as a custom model. To find model IDs, refer to the [Azure OpenAI](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models) documentation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
    | Connection Type |         | Select one of the following authorization methods: API Key or OAuth2.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
    |                 | API Key | Enter the [Azure API Key](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/quickstart?tabs=command-line\&pivots=rest-api#retrieve-key-and-endpoint). This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. You can use either `KEY1` or `KEY2`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
    |                 | OAuth2  | Enter the OAuth2 key. You can use any OAuth2-compliant provider. OAuth 2.0 offers more control and security than API keys by allowing specific permissions, expiring tokens, and reducing exposure through short-lived tokens instead of constant client secret use. To use this type of connection, fill in the following fields:<ul><li>**Client ID** — add the Application (client) ID assigned to your app. This ID can be found in the Microsoft Entra admin center: go to **App Registrations**, select an app, then click **Overview**.</li><li>**Client Secret** — add the application secret created in the **Certificates & secrets** section in the Microsoft Entra admin center: go to **App Registrations**, select an app, then click **Overview**.</li><li>**OAuth URL** — add the URL to retrieve the access token. This URL points to the `/token` endpoint on the authorization server. The URL can have any format that returns an access token.</li><li>**Scope** — add a list of scopes for user permissions, for example, `urn:grp:chatgpt`.</li><li>**Additional Header Name** — enter the key for an additional authentication header. This key can have any format, for example, of the [OCP APIM Subscription Key](https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions).</li><li>**Additional Header Value** — enter the value for the additional authentication header.</li></ul>Cognigy.AI uses the following steps to make requests with OAuth 2.0 to an Azure OpenAI model:<ol><li>**Requesting a token.** Cognigy.AI sends an HTTP POST request to <code>OAuth URL</code> with the following parameters: <code>Client ID</code>, <code>Client Secret</code>, and <code>Scope</code>.</li><li>**Receiving the token.** The authorization server validates the request and returns an access token to Cognigy.AI.</li><li>**Using the token.** When making requests to the Azure OpenAI model, Cognigy.AI includes the received token in the request instead of using an API key.</li></ol> |
    | Resource Name   |         | Enter the [resource name](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal#create-a-resource). To find this value, go to the **Microsoft Azure** home page. Under **Azure services**, click **Azure OpenAI**. In the left-side menu, under the **Azure AI Services** section, select **Azure Open AI**. Copy the desired resource name from the **Name** column.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
    | Deployment Name |         | Enter the [deployment name](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal#deploy-a-model). To find this value, go to the **Microsoft Azure** home page. Under **Azure services**, click **Azure OpenAI**. In the left-side menu, under **Azure AI Services**, select **Azure OpenAI**. Select a resource from the **Name** column. On the resource page, go to **Resource Management > Model deployments**. On the **Model deployments** page, click **Manage Deployments**. On the **Deployments** page, copy the desired deployment name from the **Deployment name** column.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
    | API Version     |         | Enter the [API version](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#rest-api-versioning). The API version to use for this operation in the `YYYY-MM-DD` format. Note that the version may have an extended format, for example, `YYYY-MM-DD-preview`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
    | Custom URL      |         | This parameter is optional. You can use it to route connections between your clusters and the Azure OpenAI provider through dedicated proxy servers for enhanced security. The custom URL can be any valid endpoint URL and must be complete, including any required query parameters. When you specify a custom URL, the **Resource Name**, **Deployment Name**, and **API Version** fields are ignored.<br />For versions 2025.20 and earlier, when selecting the **API key** connection type, you must use the following pattern: `https://<resource-name>.openai.azure.com/openai/deployments/<deployment-name>/<model-type>?api-version=<api-version>`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
    | API Type        |         | Appears only when **Chat** is selected as model type. Select one of the following API options for chat models:<ul><li>**Chat Completion** — uses the [Chat Completions API](https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/chatgpt). This option is selected by default.</li><li>**Responses** — uses the [Responses API](https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/responses).</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
  </Tab>
</Tabs>

Apply changes. Check if the connection was set up by clicking **Test**.

### Add Models via the API

You can add either a standard or custom model using the [Cognigy.AI API POST /v2.0/largelanguagemodels](https://api-trial.cognigy.ai/openapi#post-/v2.0/largelanguagemodels) request.
Then, test your connection for the created model via the [Cognigy.AI API POST /v2.0/largelanguagemodels/{largeLanguageModelId_0}/test](https://api-trial.cognigy.ai/openapi#post-/v2.0/largelanguagemodels/-largeLanguageModelId-/test).

### Deprecation of Old Connections for Microsoft Azure OpenAI

As of Cognigy.AI 4.82.0, Azure OpenAI connections that use the `AzureOpenAIProvider` connection type are deprecated. Cognigy.AI supports the `AzureOpenAIProviderV2` connection type instead.

If you have old connections (for example, created in the 4.53 release) to Azure OpenAI,
these connections have an `AzureOpenAIProvider` type and are marked with a **Deprecated** label.
Although these connections can still be active,
we strongly recommend creating a model with the new `AzureOpenAIProviderV2` type,
as old connection types will no longer be available in the future.

Note that for some Microsoft Azure OpenAI models, such as `text-embedding-ada-002` for knowledge search features, you might encounter the following error when an LLM is triggered:
`Error while performing knowledge search. Remote returned error: Search failed: Could not fetch embeddings due to missing API resource name for Azure OpenAI`.
To resolve the issue, recreate the model and the connection so that both are updated to the latest format.

## Apply the Model

To apply a model, follow these steps:

1. In the left-side menu of the Project, go to **Manage > Settings**.
2. Go to the section based on your use case for using a model:
   * **Generative AI Settings**. In the **Generative AI Settings** section, activate **Enable Generative AI Features**. This setting is toggled on by default if you have previously set up the Generative AI credentials.
   * **Knowledge AI Settings**. Use this section if you need to add a model for Knowledge AI. Select a model for the **Knowledge Search** and **Answer Extraction** features. Refer to the [list of standard models](https://docs.cognigy.com/ai/empower/llms/model-support-by-feature/) and find the models that support these features.
3. Navigate to the desired feature and select a model from the list. If there are no models available for the selected feature, the system will automatically select **None**. Save changes.

## More Information

* [Other LLM Operations](/ai/agents/develop/gen-ai-and-llms/other-operations)
* [Overview](/ai/agents/develop/gen-ai-and-llms/llms)
* [All LLM Providers](/ai/agents/develop/gen-ai-and-llms/providers/all-providers)
* [Model support by feature](/ai/agents/develop/gen-ai-and-llms/model-support-by-feature)
* [OpenAI](/ai/agents/develop/gen-ai-and-llms/providers/openai)
