Skip to content

Alan-Kuan/AOAI-for-Word-backend

Repository files navigation

Azure OpenAI for Word (Backend)

This is the backend of the Office Add-in, Azure OpenAI for Word.

Production Environment Setup

  1. Register application on Azure.
    1. Search for "App registrations"
      app registration.png
    2. Click "New Registration".
      new registration.png
    3. Register an application for this add-in.
      register an application.png
  2. Deploy to Azure App Services.
    1. Search for "App Services"
      app services.png
    2. Click "Create".
      create.png
    3. Create a web app.
      Select your resource group and choose a unique name for your app.
      create a web app - basic.png create a web app - docker.png
    4. Configure environment variables.
      After deployed, go to its configuration section on the sidebar, and set the following environment variables.
      • AZ_APP_ID: the ID of the application we just register
      • CLIENT_ID: same as previous variable
      • AUTHORITY: https://login.microsoftonline.com/<tenant ID>
      • REDIRECT_URI: the value that we will fill in at the next step
  3. Add Redirect URI
    Go to the page of the application we just registered. The hostname in the URI should be the one provided by App Service we create in previous step. Besides, remember to make it issue both ID token and access token. configuration.png