Azure-Samples / Azure-Samples/remote-mcp-apim-functions-python
EasyAuth returns 403 forbidden
- Lenguaje dominante
- Bicep
- Estrellas
- 129
- Forks
- 79
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
I have made some changes to try use EasyAuth instead of function key. Copilot suggested using the same app registration so that has been my main attempt. I get everything working except at the very end, it returns 403 when trying to get the list of MCP tools after getting authenticated. The error in the function app:
```
2025-07-18T21:54:34Z [Information] Authorization failed. These requirements were not met:
Handler assertion should evaluate to true.
2025-07-18T21:54:34Z [Information] Executing ForbidResult with authentication schemes (WebJobsAuthLevel, Bearer).
2025-07-18T21:54:34Z [Information] AuthenticationScheme: WebJobsAuthLevel was forbidden.
```
I also made changes to persist the ClientInfo by adding http endpoints to store and fetch the client information. These http endpoints are in the same function app and they do not get rejected. Why do only the MCP endpoints fail the authentication scheme with the exact same token?
Guía de contribución
Línea de trabajo
Comienza comparando la autenticación de los endpoints de MCP con los endpoints HTTP utilizados para almacenar y obtener ClientInfo; después, reproduce la solicitud tools-list e inspecciona los registros de autorización de function-app mostrados. Se considera completado cuando se acepta el mismo token para la solicitud de MCP sin la respuesta forbid de WebJobsAuthLevel.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- azure
- Área
- api, authentication, backend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100