Files
crewAI/lib
Devin AI aded8ef74a feat: Add Azure AD token authentication support for Azure provider
This commit adds support for Azure AD token authentication (Microsoft Entra ID)
to the Azure AI Inference native provider, addressing issue #4069.

Changes:
- Add credential parameter for passing TokenCredential directly
- Add azure_ad_token parameter and AZURE_AD_TOKEN env var support
- Add use_default_credential flag for DefaultAzureCredential
- Add _StaticTokenCredential class for wrapping static tokens
- Add _select_credential method with clear priority order
- Update error messages to reflect all authentication options
- Add comprehensive tests for all new authentication methods

Authentication Priority:
1. credential parameter (explicit TokenCredential)
2. azure_ad_token parameter or AZURE_AD_TOKEN env var
3. api_key parameter or AZURE_API_KEY env var
4. use_default_credential=True (DefaultAzureCredential)

Fixes #4069

Co-Authored-By: João <joao@crewai.com>
2025-12-11 08:56:46 +00:00
..