[HOWTO] Configure Azure App Service authentication and App Registration for an application deployed by Azure OpenAI Studio

A colleague at work is currently working on a prototype for Azure OpenAI Services integration. He deployed the prototype application directly from Azure OpenAI Studio to an Azure App Service. When he tried to access the application for the first time, he received the following error message.

Authentication Not Configured
This app does not have authentication configured. Please add an identity provider by finding your app in the Azure Portal and following these instructions

The error message still appeared after 10 minutes…

To fix the error, we followed the linked instructions: Tutorial – Add app authentication to a web app on Azure App Service – Azure App Service | Microsoft Learn. However, due to a lack of permissions, we created the app registration in advance and selected Pick an existing app registration in this directory as the App registration type in the wizard. In order for the app registration we created ourselves to work, we had to modify the app registration as follows.

Add redirect URI & enable ID token

  1. Go to the Azure portal
  2. Switch to the correct directory
  3. Open Azure Active Directory
  4. Select App registrations in the left navigation bar
  5. Select tab All applications
  6. Open the corresponding app registration
  7. Select Authentication
  8. Click + Add a platform
  9. Select Web
  10. Enter {APP_SERVICE_URL}/.auth/login/aad/callback as redirect URI
  11. Tick checkbox ID tokens (used for implicit and hybrid flows)

As a finals step an admin has to log in to the application by browsing to the app service URL and grant admin consent. Important: make sure the admin ticks the checkbox Consent on behalf of your organization before accepting.

Leave a Reply

Powered by WordPress.com.

Up ↑

Discover more from blog.rufer.be

Subscribe now to keep reading and get access to the full archive.

Continue reading