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

# Configuring the Azure OpenAI Action

[Back to Actions Integrations](https://koreai.mintlify.site/ai-for-service/integrations/overview.md#actions)

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](https://koreai.mintlify.site/ai-for-service/app-settings.md#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**.

   ![Azure portal](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)

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

   ![Create](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)

3. Fill in the required fields:

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

   ![Create app](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)

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

   ![Create app](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)

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

   ![Go to resource](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)

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

   ![User Domain Name](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)

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

   ![API Key](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)

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

   ![Deploy model](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)

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

   ![Copy model name](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)

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

    ![Playground](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)

***

## 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**.

   ![Auth type](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)

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.

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

   ![Enable](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)

> [!NOTE]
>
> The Azure OpenAI action moves from Available to Configured.

### 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**.

   ![Create new](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)

4. Select the authorization mechanism (for example, **API Key**).

   ![API Key](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)

   See [App Authorization Overview](https://koreai.mintlify.site/ai-for-service/app-settings.md#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.

   ![Save auth](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)

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

   ![Enable](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)

***

## Step 3: Install Azure OpenAI Action Templates

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

   ![Explore templates](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)

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

   ![Install](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)

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](https://koreai.mintlify.site/ai-for-service/integrations/actions/using-the-azure-openai-action-templates).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.