Users
Stores user account details in Box, supporting creation, management, and retrieval of users across the enterprise.
Table Specific Information
Note: Authenticated users must have permission to look up users in the entire Box enterprise.Select
You can retrieve information about the current User, a User in your enterprise specified by Id, or all the Users in the enterprise.
SELECT * FROM Users;
You can also retrieve the information of any User who is in your enterprise:
SELECT * FROM Users WHERE Id = '1';
If you're authenticated as an administrator with user impersonation permissions, you can query users from multiple user accounts:
SELECT * FROM Users WHERE AsUserId IN (SELECT Id FROM Users);
Note: User impersonation has the following limitations:
- The authenticated user cannot be impersonated unless that user is a service account.
- If the authenticated user is a standard user account, they can only query users associated with their account.
- Users shared with multiple users are only returned for one of the users.
Insert
You can invite a User to your enterprise. The following query will send an invitation email to join your enterprise:
INSERT INTO Users (Login, Name, Role) VALUES ('[email protected]', 'Username', 'coadmin');
Update
Any column where ReadOnly=False can be updated.
UPDATE Users SET Name = 'Test', Role = 'user', IsExemptFromDeviceLimits = false WHERE Id = '111';
Delete
Delete users by specifying its Id:
DELETE FROM Users WHERE Id = '111'
Columns
| Name | Type | ReadOnly | Description |
| Id [KEY] | String | True |
Unique identifier assigned to the user. When querying, this can be set to the value 'me' to return details for the currently authenticated user. |
| Login | String | False |
The login email address of the user. |
| Name | String | False |
The full display name of the user. |
| EnterpriseId | String | False |
Identifier of the enterprise the user belongs to. Can be set to null to disassociate the user from the enterprise. |
| Role | String | False |
The user's role within the enterprise, such as admin, co-admin, or user. |
| Language | String | False |
The preferred language setting for the user interface. |
| IsPlatformAccessOnly | Boolean | False |
Indicates whether the account is a Box app user without full standard access. |
| IsSyncEnabled | Boolean | False |
Indicates whether the user is allowed to use Box Sync for offline file access. |
| JobTitle | String | False |
The job title provided for the user. |
| Phone | String | False |
The phone number associated with the user. |
| Address | String | False |
The mailing address of the user. |
| SpaceAmount | Long | False |
The total storage space allocated to the user, measured in bytes. |
| SpaceUsed | Long | False |
The amount of storage space the user has consumed, measured in bytes. |
| MaxUploadSize | Long | False |
The maximum file size the user is allowed to upload, measured in bytes. |
| TrackingCodes | String | False |
Custom tracking codes associated with the user, separated by commas. |
| CanSeeManagedUsers | Boolean | False |
Indicates whether the user has permission to view other managed users in the enterprise. |
| TimeZone | String | False |
The preferred time zone setting for the user. |
| IsExemptFromDeviceLimits | Boolean | False |
Indicates whether the user is exempt from restrictions on the number of devices linked to their account. |
| IsExemptFromLoginVerification | Boolean | False |
Indicates whether the user is exempt from login verification requirements, such as two-step authentication. |
| Status | String | False |
The current status of the user account, such as active, inactive, or deleted. |
| IsPasswordResetRequired | Boolean | False |
Indicates whether the user must reset their password on the next login. |
| CreatedAt | Datetime | True |
The date and time when the user account was created. |
| ModifiedAt | Datetime | True |
The date and time when the user account was last updated. |
| AsUserId | String | False |
Identifier of the user to impersonate for API requests, available only for Admin, Co-Admin, and Service Accounts. |