chroma-core/chroma · error · ChromaAuthError

Tenant does not match from the server. Are you sure the…

Error message

Tenant {user_provided_tenant} does not match {new_tenant} from the server. Are you sure the tenant is correct?

What it means

ChromaError raised in maybe_set_tenant_and_database when the tenant explicitly provided by the user (and not the default) differs from the tenant resolved from server-side auth identity. Per the surrounding comment, it typically occurs when overwrite_singleton_tenant_database_access_from_auth=True is set without an auth provider, so tenant/database resolve to defaults that clash with the user's supplied values.

Solutions

  1. Omit the tenant argument and let the server resolve it from auth
  2. Fix the provided tenant to match the authenticated identity's tenant
  3. Disable overwrite_singleton_tenant_database_access_from_auth when no auth provider is configured
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at chromadb/auth/utils/__init__.py:68 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16). Data as JSON: /api/errors/d4f6e97896464c55. Report an issue: GitHub.

Appendix: source

Thrown at chromadb/auth/utils/__init__.py:68

        new_database,
    ) = _singleton_tenant_database_if_applicable(
        user_identity=user_identity,
        overwrite_singleton_tenant_database_access_from_auth=overwrite_singleton_tenant_database_access_from_auth,
    )

    # The only error case is if the user provides a tenant and database that
    # don't match what we resolved from auth. This can incorrectly happen when
    # there is no auth provider set, but overwrite_singleton_tenant_database_access_from_auth
    # is set to True. In this case, we'll resolve tenant/database to the default
    # values, which might not match the provided values. Thus, it's important
    # to ensure that the flag is set to True only when there is an auth provider.
    if (
        user_provided_tenant
        and user_provided_tenant != DEFAULT_TENANT
        and new_tenant
        and new_tenant != user_provided_tenant
    ):
        raise ChromaAuthError(f"Tenant {user_provided_tenant} does not match {new_tenant} from the server. Are you sure the tenant is correct?")
    if (
        user_provided_database
        and user_provided_database != DEFAULT_DATABASE
        and new_database
        and new_database != user_provided_database
    ):
        raise ChromaAuthError(f"Database {user_provided_database} does not match {new_database} from the server. Are you sure the database is correct?")

    if (
        not user_provided_tenant or user_provided_tenant == DEFAULT_TENANT
    ) and new_tenant:
        user_provided_tenant = new_tenant
    if (
        not user_provided_database or user_provided_database == DEFAULT_DATABASE
    ) and new_database:
        user_provided_database = new_database

    return user_provided_tenant, user_provided_database

View on GitHub (pinned to aecdd12c8a)