# Update user's active account (tenant)

Update the current account (tenant) for a logged-in user.

Use this endpoint when a user belongs to multiple accounts (tenants) and wants to change the active account (tenant).

Include the target account (tenant) ID in the request body.

Endpoint: PUT /resources/users/v1/tenant
Version: 1.0
Security: bearer

## Security:

  - `bearer` (unknown)
    http bearer JWT

## Header parameters:

  - `frontegg-tenant-id` (string, required)
    The tenant ID identifier

  - `frontegg-user-id` (string, required)
    The user ID identifier

## Request fields (application/json):

  - `tenantId` (string, required)
    Desired tenant to set as active tenant for user

## Response 200 fields (application/json):

  - `id` (string, required)

  - `email` (string, required)

  - `name` (string, required)

  - `profilePictureUrl` (string, required)

  - `sub` (string, required)

  - `verified` (boolean, required)

  - `mfaEnrolled` (boolean, required)

  - `mfaBypass` (boolean)

  - `phoneNumber` (string)

  - `roles` (array, required)

  - `roles.id` (string, required)

  - `roles.vendorId` (string, required)

  - `roles.tenantId` (string, required)

  - `roles.key` (string, required)

  - `roles.name` (string, required)

  - `roles.description` (string, required)

  - `roles.isDefault` (boolean, required)

  - `roles.firstUserRole` (boolean, required)

  - `roles.level` (number, required)

  - `roles.createdAt` (string, required)

  - `roles.updatedAt` (string, required)

  - `roles.permissions` (array, required)

  - `permissions` (array, required)

  - `permissions.id` (string, required)

  - `permissions.key` (string, required)

  - `permissions.name` (string, required)

  - `permissions.description` (string, required)

  - `permissions.createdAt` (string, required)

  - `permissions.updatedAt` (string, required)

  - `permissions.roleIds` (array, required)

  - `permissions.categoryId` (string, required)

  - `permissions.fePermission` (boolean, required)

  - `provider` (string, required)

  - `tenantId` (string, required)

  - `tenantIds` (array, required)

  - `activatedForTenant` (boolean)

  - `isLocked` (boolean)

  - `tenants` (array, required)

  - `tenants.tenantId` (string, required)

  - `tenants.roles` (array, required)

  - `tenants.temporaryExpirationDate` (string)

  - `tenants.isDisabled` (boolean)

  - `invisible` (boolean)

  - `superUser` (boolean)

  - `metadata` (string, required)

  - `vendorMetadata` (string, required)

  - `externalId` (string)

  - `createdAt` (string, required)

  - `lastLogin` (string, required)

  - `groups` (array)

  - `subAccountAccessAllowed` (boolean, required)

  - `managedBy` (string)
    Enum: "frontegg", "scim2", "external"

