{"record":{"id":"d68ef00abfceeee2","repo":"BerriAI/litellm","slug":"you-must-be-a-litellm-enterprise-user-to-use-sso-f","errorCode":null,"errorMessage":"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","messagePattern":"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","errorType":"http","errorClass":"ProxyException","httpStatus":403,"severity":"error","filePath":"litellm/proxy/management_endpoints/ui_sso.py","lineNumber":1018,"sourceCode":"        return access_token_payload\n\n    return None\n\n\nasync def _raise_if_sso_exceeds_free_user_limit(premium_user: bool, prisma_client: PrismaClient | None) -> None:\n    \"\"\"Free tier allows SSO for up to 5 billable users; beyond that requires an Enterprise license.\"\"\"\n    if premium_user is True:\n        return\n    if prisma_client is None:\n        raise ProxyException(\n            message=CommonProxyErrors.db_not_connected_error.value,\n            type=ProxyErrorTypes.auth_error,\n            param=\"premium_user\",\n            code=status.HTTP_403_FORBIDDEN,\n        )\n    billable_users: Final = await UserRepository(prisma_client).count_billable_users()\n    if billable_users and billable_users > 5:\n        raise ProxyException(\n            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\",\n            type=ProxyErrorTypes.auth_error,\n            param=\"premium_user\",\n            code=status.HTTP_403_FORBIDDEN,\n        )\n\n\n@router.get(\"/sso/key/generate\", tags=[\"experimental\"], include_in_schema=False)\nasync def google_login(\n    request: Request,\n    source: str | None = None,\n    key: str | None = None,\n    existing_key: str | None = None,\n    return_to: str | None = None,\n    user_code: str | None = None,\n):\n    \"\"\"\n    Create Proxy API Keys using Google Workspace SSO. Requires setting PROXY_BASE_URL in .env","sourceCodeStart":1000,"sourceCodeEnd":1036,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/ui_sso.py#L1000-L1036","documentation":"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.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/ui_sso.py:1018 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["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."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}