Spring AI 2 regression authentication to Azure Open AI with custom Credential Builder
Please do a quick search on GitHub issues first, there might be already a duplicate issue for the one you are about to create. If the bug is trivial, just go ahead and create the issue. Otherwise, please take a few moments and fill in the following sections:
Bug description
Switching from Spring Ai 1 to Spring AI 2.0.1 removes UAMI authentication for Azure Foundry models.
->
static Credential getAzureCredential() {
return getAzureCredential(new DefaultAzureCredentialBuilder().build());
}There is no way to override that.
Environment Spring AI 2.0.1, Java 25
Steps to reproduce Authenticate against Azure OpenAI with Managed Identity
Expected Behavior
Spring AI 2 supports authentication to Azure Open AI with custom credential builder (UAMI, AASP)
Current Behavior
Spring AI 2 supports only API Key Based auth authentication OR AZURE_CLIENT_ID - single env variable, which limits our multi model configuration.
Source: spring-projects/spring-ai