Skip to content

Support Azure TokenCredential for authentication against Azure OpenAI #1624

Closed
@asaikali

Description

@asaikali

The current AzureOpenAI auto-configuration code assume that the users will provide a static api key if no key is set, then an exception is throw see

public OpenAIClientBuilder openAIClientBuilder(AzureOpenAiConnectionProperties connectionProperties) {

Azure supports a keyless authentication mode that uses Azure Active Directory and system identity. Some users of Azure will disable key based accessed for the Azure Open AI service and those users can't use spring-ai with azure open ai.

Todo:

  • Enhance the the AzureOpenAiAutoConfiguration to support keyless authentication.
  • Document how users can configure keyless authentication

Reference https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/authentication

Resources:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions