voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
32 lines (18 loc) • 809 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/auth](./auth.md) > [User](./auth.user.md) > [tenantId](./auth.user.tenantid.md)
## User.tenantId property
The user's tenant ID.
<b>Signature:</b>
```typescript
readonly tenantId: string | null;
```
## Remarks
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
```javascript
// 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'.
```