The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/auth > User > tenantId

User.tenantId property

The user's tenant ID.

Signature:

readonly tenantId: string | null;

Description

This is a read-only property, which indicates the tenant ID used to sign in the user. This is null if the user is signed in from the parent project.

Example

// Set the tenant ID on Auth instance.
auth.tenantId = 'TENANT_PROJECT_ID';

// All future sign-in request now include tenant ID.
const result = await signInWithEmailAndPassword(auth, email, password);
// result.user.tenantId should be 'TENANT_PROJECT_ID'.