Is it possible to use Azure AD authentication in AOAI

DShree 396 Reputation points
2023-03-31T09:19:29.9733333+00:00

Can I utilize the Bearer token instead of using the key from the Azure Open AI. If yes can you please share the sample.

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,272 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ramr-msft 17,821 Reputation points
    2023-03-31T09:34:01.4666667+00:00

    @D-0887 Thanks for the question. Our current Azure OpenAI documentation indeed currently describes the use of API keys as per this example where you are expected to pass the API key through the header's "api-key" value.

    However you will generate a Bearer token in Azure AD and pass it over to the same Azure OpenAI endpoint, but using slightly different header's key "Authorization", then you would be able to retrieve the same data.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.