[FEATURE REQ] Provide native support for API key–based authentication, similar to other SDKs.
Los mantenedores suelen responder en 1 día
@trrwilson ya está trabajando en esto.
Desde el 8/8/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Currently, the com.azure:azure-ai-agents:2.0.1 SDK enforces a Bearer token–based authentication model via TokenCredential.
However, when using Azure API Management (APIM) in front of Azure OpenAI/Agents endpoints, authentication is commonly handled using API Key headers (e.g., x-api-key), not Bearer tokens.
At the moment, there is no first-class support to pass API key–based credentials. Even when attempting to override the pipeline manually (as shown below), the SDK still expects a credential and does not provide a clean or supported way to use API key authentication.
val builder = AgentsClientBuilder()
builder.endpoint(baseUrl)
builder.httpLogOptions(HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS))
val httpClient = HttpClient.createDefault()
val headers = HttpHeaders()
headers.set(credentials.keyName, credentials.keyValue)
val pipeline = HttpPipelineBuilder()
.policies(AddHeadersPolicy(headers))
.httpClient(httpClient)
.build()
builder.pipeline(pipeline)
// Forced workaround
builder.credential(null)
val client = builder.buildAgentsClient()
This approach is fragile and not officially supported, making integration with APIM cumbersome.
Describe the solution
For example:
Add a method like:
builder.apiKeyCredential(ApiKeyCredential("key-name", "key-value"))
Alternatively, allow:
Custom headers to be injected without requiring TokenCredential
A dedicated AzureApiKeyCredential or similar abstraction
This would make it seamless to integrate with Azure APIM endpoints.
- Lenguaje dominante
- Java
- Estrellas
- 2.6k
- Forks
- 2.2k
- Merge medio
- 1 d 22 h
- PR fusionados (30 d)
- 213
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Azure/azure-sdk-for-java
-
mgmt, in track 1 migration guide, call out that file-based authentication method is not recommendedQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. AbiertoAzure.Identity
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
Azure/azure-sdk-for-java#48894 ·
Los mantenedores suelen responder en 1 día
-
[BUG] - Handler.close livelocks on FAIL_NON_SERIALIZED while holding the ReactorConnection monitorPosiblemente ocupada @conniey la tomó hace 1 día. AbiertoAzure.Core.AMQP Client customer-reported needs-team-attention question
Azure/azure-sdk-for-java#50879 · 2 comentarios · 1 reacción · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Design] Support External Evaluation Policy (Invoke) in management SDKsPosiblemente ocupada @weidongxu-microsoft la tomó hace 6 días. Abierto
Azure/azure-sdk-for-java#50818 · 2 reacciones · 2 asignados ·
Los mantenedores suelen responder en 1 día
-
[BUG] azure-core-http-vertx: Streaming request bodies hang on Vert.x 5.x (NoSuchMethodError on HttpClientRequest.reset)Posiblemente ocupada @alzimmermsft la tomó hace 7 días. AbiertoAzure.Core Client customer-reported needs-team-attention question
Azure/azure-sdk-for-java#50793 · 6 comentarios · 1 reacción · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[FEATURE REQ] ChangeFeedProcessor event handler fully reactive implementationPosiblemente ocupada @FabianMeiswinkel la tomó hace 7 días. AbiertoClient Cosmos customer-reported feature-request needs-team-attention Service Attention
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
Azure/azure-sdk-for-java#50758 · 3 comentarios · 1 reacción · 2 asignados ·
Los mantenedores suelen responder en 1 día
Todos los issues de Azure/azure-sdk-for-java
Issues similares
-
approved
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
checkstyle/checkstyle#22129 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
objectionary/lints#1577 ·
Los mantenedores suelen responder en 2 días
-
ChaosEngine: backup-remote doctor row passes while consumer mode hides bot memory from gitPosiblemente ocupada @MohabMohie la tomó hoy. Abiertoagentic
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ShaftHQ/SHAFT_ENGINE#7263 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100