BerriAI/litellm · error · ValueError

No credential provided

Error message

No credential provided

What it means

ValueError from get_azure_ad_token_provider when no Azure credential type/value was supplied (or the requested AzureCredentialType branch produced no credential). Sentinel guard for a missing credential argument.

Source

Thrown at litellm/secret_managers/get_azure_ad_token_provider.py:107

                certificate_path=os.environ["AZURE_CERTIFICATE_PATH"],
                password=os.environ["AZURE_CERTIFICATE_PASSWORD"],
            )
        else:
            credential = CertificateCredential(
                client_id=os.environ["AZURE_CLIENT_ID"],
                tenant_id=os.environ["AZURE_TENANT_ID"],
                certificate_path=os.environ["AZURE_CERTIFICATE_PATH"],
            )
    elif cred == AzureCredentialType.DefaultAzureCredential:
        # DefaultAzureCredential doesn't require explicit environment variables
        # It automatically discovers credentials from the environment (managed identity, CLI, etc.)
        credential = DefaultAzureCredential()
    else:
        cred_cls: Final = getattr(identity, cred)
        credential = cred_cls()

    if credential is None:
        raise ValueError("No credential provided")

    return get_bearer_token_provider(credential, azure_scope)

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Provide an Azure AD credential: set AZURE_CLIENT_ID/AZURE_CLIENT_SECRET/AZURE_TENANT_ID, or enable managed identity.
  2. Ensure DefaultAzureCredential has at least one viable credential source in the environment.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/secret_managers/get_azure_ad_token_provider.py:107 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/66723d1dc80bec51. Report an issue: GitHub.