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

# Configuring the Azure OpenAI Action

<Badge icon="arrow-left" color="gray">[Back to Actions Integrations](/ai-for-service/integrations/overview#actions)</Badge>

Connect the Platform to Azure OpenAI to resolve general queries using GPT models. See [Azure OpenAI Service](https://azure.microsoft.com/en-us/) for details.

***

## Supported Authorization Types

The platform supports Basic Auth for Azure OpenAI integration. See [App Authorization Overview](/ai-for-service/app-settings#authorization-profiles) for details.

| Authorization Type                       | Supported |
| ---------------------------------------- | --------- |
| Pre-Authorize the Integration            | Yes       |
| Allow Users to Authorize the Integration | Yes       |

***

## Step 1: Create an Azure OpenAI App

**Prerequisites:**

* Create an [Azure OpenAI](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/overview) developer account.
* Copy the **API Key**, **User Sub Domain**, and **Deployment ID** values for later use.

**Steps:**

1. Log in to the [Azure portal](https://portal.azure.com) and search for **Azure OpenAI**.

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img1-azure-openai-app.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=49868a3dae541108d2e910b30c031808" alt="Azure portal" width="1365" height="233" data-path="ai-for-service/integrations/actions/images/configure-azure-img1-azure-openai-app.png" />

2. On the Cognitive Services Azure OpenAI page, click **Create**.

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img2-azure-create.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=925aca8ee167c6ab174e5c08700114a8" alt="Create" width="1356" height="299" data-path="ai-for-service/integrations/actions/images/configure-azure-img2-azure-create.png" />

3. Fill in the required fields:

   * **Resource Group** - Select or create a resource group.
   * **Region** - e.g., South Central US.
   * **Name** - e.g., PlatformIntegration.
   * **Pricing Tier** - e.g., Standard.

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img3-create-azure-app.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=9eb69e1a0f0e5cae93c21bac6402108d" alt="Create app" width="1150" height="653" data-path="ai-for-service/integrations/actions/images/configure-azure-img3-create-azure-app.png" />

4. Click **Next** > **Review + Submit**, then click **Create** after validation passes.

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img4-create-app.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=1bd183780f2bccdef6a54e1ba02cb3b8" alt="Create app" width="1058" height="647" data-path="ai-for-service/integrations/actions/images/configure-azure-img4-create-app.png" />

5. Click **Go to Resource** to view app details.

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img5-go-to-resource.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=3c80a6e9da34da56a92b18f5d1a45459" alt="Go to resource" width="1046" height="559" data-path="ai-for-service/integrations/actions/images/configure-azure-img5-go-to-resource.png" />

6. On the Overview page, copy the **User Domain Name**.

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img6-azure-user-domain.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=e42a8cc28960b3ed3652f33d2c498f44" alt="User Domain Name" width="1317" height="563" data-path="ai-for-service/integrations/actions/images/configure-azure-img6-azure-user-domain.png" />

7. Under **Keys and Endpoints**, click **Show Keys** and copy the **API Key**.

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img7-azure-api-key.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=f5e5233d8aa4bd257a13be4fce0f35fa" alt="API Key" width="1364" height="591" data-path="ai-for-service/integrations/actions/images/configure-azure-img7-azure-api-key.png" />

8. Under **Model Deployments**, create a new deployment (e.g., name: PlatformDeploy, model: text-davinci-001) and click **Save**.

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img8-azure-deploy-model.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=ebb2c1a0ac47c871d32a92572b007414" alt="Deploy model" width="1355" height="653" data-path="ai-for-service/integrations/actions/images/configure-azure-img8-azure-deploy-model.png" />

9. Copy the **Model Name** of the new deployment.

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img9-azure-deploy-model1.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=da58832ec145a77838211e78d5fb6981" alt="Copy model name" width="1362" height="637" data-path="ai-for-service/integrations/actions/images/configure-azure-img9-azure-deploy-model1.png" />

10. Alternatively, copy credentials from **Azure OpenAI Studio > Playground > GPT-3 > View Code**.

    <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img10-azure-chatgpt-playground.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=ad88c1a8e61c790d83fb0a2ca7e736ed" alt="Playground" width="1365" height="645" data-path="ai-for-service/integrations/actions/images/configure-azure-img10-azure-chatgpt-playground.png" />

***

## Step 2: Enable the Azure OpenAI Action

Go to **App Settings > Integrations > Actions** and select **Azure OpenAI**.

### Pre-authorize the Integration (Basic Auth)

1. In the **Configurations** dialog, select the **Authorization** tab.

2. Set **Authorization Type** to **Pre-authorize the Integration** > **Basic Auth**.

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img12-azure-openai-config-change.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=63e09824054d0fa5b8a3407b7fae07fe" alt="Auth type" width="1077" height="826" data-path="ai-for-service/integrations/actions/images/configure-azure-img12-azure-openai-config-change.png" />

3. Enter the following fields:

   | Field           | Description                          |
   | --------------- | ------------------------------------ |
   | API Key         | Secret API key from Step 1           |
   | User Sub Domain | Domain name from Step 1              |
   | Deployment ID   | Deployment ID/model name from Step 1 |

   <Note>You can enter the deployment ID for ChatGPT-3 or ChatGPT-3.5 to configure the GPT model.</Note>

4. Click **Enable**. The Integration Successful pop-up appears on first configuration.

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img13-azure-action6.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=f2f8dd69c6be37d928320dce5468ad00" alt="Enable" width="590" height="237" data-path="ai-for-service/integrations/actions/images/configure-azure-img13-azure-action6.png" />

<Note>The Azure OpenAI action moves from Available to Configured.</Note>

### Allow End Users to Authorize (Basic Auth)

1. In the **Configurations** dialog, select the **Authorization** tab.

2. Set **Authorization Type** to **Allow Users to Authorize the Integration** > **Basic Auth**.

3. Click **Select Authorization** > **Create New**.

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img14-azure-action2.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=8249731acaecb60e419cbfc4efd41703" alt="Create new" width="798" height="844" data-path="ai-for-service/integrations/actions/images/configure-azure-img14-azure-action2.png" />

4. Select the authorization mechanism (e.g., **API Key**).

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img15-open-ai-api-key1-1.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=82612a39a6de3a5a4fc79823dbd2bb16" alt="API Key" width="785" height="910" data-path="ai-for-service/integrations/actions/images/configure-azure-img15-open-ai-api-key1-1.png" />

   See [App Authorization Overview](/ai-for-service/app-settings#authorization-profiles) for creating Basic Auth profiles.

5. Enter the following credentials:

   | Field                   | Description                                   |
   | ----------------------- | --------------------------------------------- |
   | Name                    | Name for the Basic Auth profile               |
   | Tenancy URLs            | Select Yes if tasks require tenancy URLs      |
   | Base URL                | Base tenant URL for the Azure OpenAI instance |
   | Authorization Check URL | Auth check URL                                |
   | Description             | Description of the auth profile               |

6. Click **Save Auth**, then select the new profile.

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img16-azure-action3.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=26a15ab83dd57e44cbd3cabdcb2fd5c9" alt="Save auth" width="796" height="908" data-path="ai-for-service/integrations/actions/images/configure-azure-img16-azure-action3.png" />

7. Click **Enable**. The Integration Successful pop-up appears.

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img17-azure-action5.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=95cc578b6f9938529bc780c4663a7db0" alt="Enable" width="794" height="848" data-path="ai-for-service/integrations/actions/images/configure-azure-img17-azure-action5.png" />

***

## Step 3: Install Azure OpenAI Action Templates

1. On the Integration Successful dialog, click **Explore Templates**.

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img18-azure-action6.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=4ebb4131014d9ff4cea43d687980ab26" alt="Explore templates" width="591" height="239" data-path="ai-for-service/integrations/actions/images/configure-azure-img18-azure-action6.png" />

2. Click **Install** for the desired template.

   <img src="https://mintcdn.com/koreai/7TeKpNFD7QJEMcMu/ai-for-service/integrations/actions/images/configure-azure-img19-azure-action7.png?fit=max&auto=format&n=7TeKpNFD7QJEMcMu&q=85&s=a690b39da710366bdd5c4f25f4912d71" alt="Install" width="589" height="287" data-path="ai-for-service/integrations/actions/images/configure-azure-img19-azure-action7.png" />

3. The associated dialog task is auto-created. Click **Go to Dialog** or navigate to **Automation AI > Use Cases > Dialogs**.

4. To use the templates, see [Using Azure OpenAI Action Templates](/ai-for-service/integrations/actions/using-the-azure-openai-action-templates).
