BerriAI/litellm · error · ProxyException

You must be a LiteLLM Enterprise user to use SSO for more th

Error message

You must be a LiteLLM Enterprise user to use SSO for more than 5 users. If you have a license please set `LITELLM_LICENSE` in your env. If you want to obtain a license meet with us here: https://enterprise.litellm.ai/demo You are seeing this error message because You configured SSO (one of `MICROSOFT_CLIENT_ID`, `GOOGLE_CLIENT_ID`, `GENERIC_CLIENT_ID`, or SAML) in your env. Please unset it

What it means

Error "You must be a LiteLLM Enterprise user to use SSO for more than 5 users. If you have a license please set `LITELLM_LICENSE` in your env. If you want to obtain a license meet with us here: https://enterprise.litellm.ai/demo You are seeing this error message because You configured SSO (one of `MICROSOFT_CLIENT_ID`, `GOOGLE_CLIENT_ID`, `GENERIC_CLIENT_ID`, or SAML) in your env. Please unset it" thrown in BerriAI/litellm.

Source

Thrown at litellm/proxy/management_endpoints/ui_sso.py:1018

        return access_token_payload

    return None


async def _raise_if_sso_exceeds_free_user_limit(premium_user: bool, prisma_client: PrismaClient | None) -> None:
    """Free tier allows SSO for up to 5 billable users; beyond that requires an Enterprise license."""
    if premium_user is True:
        return
    if prisma_client is None:
        raise ProxyException(
            message=CommonProxyErrors.db_not_connected_error.value,
            type=ProxyErrorTypes.auth_error,
            param="premium_user",
            code=status.HTTP_403_FORBIDDEN,
        )
    billable_users: Final = await UserRepository(prisma_client).count_billable_users()
    if billable_users and billable_users > 5:
        raise ProxyException(
            message="You must be a LiteLLM Enterprise user to use SSO for more than 5 users. If you have a license please set `LITELLM_LICENSE` in your env. If you want to obtain a license meet with us here: https://enterprise.litellm.ai/demo You are seeing this error message because You configured SSO (one of `MICROSOFT_CLIENT_ID`, `GOOGLE_CLIENT_ID`, `GENERIC_CLIENT_ID`, or SAML) in your env. Please unset it",
            type=ProxyErrorTypes.auth_error,
            param="premium_user",
            code=status.HTTP_403_FORBIDDEN,
        )


@router.get("/sso/key/generate", tags=["experimental"], include_in_schema=False)
async def google_login(
    request: Request,
    source: str | None = None,
    key: str | None = None,
    existing_key: str | None = None,
    return_to: str | None = None,
    user_code: str | None = None,
):
    """
    Create Proxy API Keys using Google Workspace SSO. Requires setting PROXY_BASE_URL in .env

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Set LITELLM_LICENSE to a valid Enterprise license, or unset the SSO env vars (MICROSOFT_CLIENT_ID, GOOGLE_CLIENT_ID, GENERIC_CLIENT_ID, SAML) to stay within the 5-user free tier.

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/ui_sso.py:1018 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/d68ef00abfceeee2. Report an issue: GitHub.