Details
| ID | Box |
|---|---|
| Provider | Box |
| Category | IT Services |
| From Version | 5.0.0 |
| Supported Modules | Agentix XSIAM |
README
Deprecated. Use the Box v2 integration instead.
Configure Box in Cortex
| Parameter | Description | Required |
|---|---|---|
| insecure | Trust any certificate (not secure) | False |
How to initialize the Box integration
Note: The following steps should be done in less than 30 seconds due to Box security.
- Create a new Box instance. Do not click Test.
- In your browser, copy the following line containing the Cortex XSOAR application client id:
https://account.box.com/api/oauth2/authorize?response_type=code&client_id=hznnisyhdf09nu9saf2eyfzupawrn9b2&state=lulubalulu
(client_id is demisto-application client id) - Click Grant access to Box. Allow access to it using your box credentials.
- You will be redirected to a non active page, with a url in this form:
https://localhost/?state=lulubalulu&code=MCTNCsN1gJIjA2cEJ72nczpXzcLVVQxJ - Copy the code from the url and use it the next step. (For example, copy MCTNCsN1gJIjA2cEJ72nczpXzcLVVQxJ)
- Run the box_initiate command with the access_code argument in the CLI in this form:
!box_initiate access_code=ACCESS_CODE
For additional information, watch https://www.youtube.com/watch?v=ha26tN8amI0
Or read about the box oauth2 process at https://developer.box.com/guides/authentication/oauth2/
Commands
You can execute these commands from the CLI, as part of an automation, or in a playbook.
After you successfully execute a command, a DBot message appears in the War Room with the command details.
box_get_current_user
Retrieves information about the user who is currently logged in i.e. the user for whom this auth token was generated
Base Command
box_get_current_user
Input
| Argument Name | Description | Required |
|---|---|---|
| verbose | Print verbose data on each user | Optional |
Context Output
There is no context output for this command.
Command Example
#### Context Example
```json
{}
Human Readable Output
Box account current user
ID Username Name Created at Status 14226607780 exampleuser@paloaltonetworks.com My Name 2020-09-25T15:23:39-07:00 active
box_get_users
Returns a list of all users for the Enterprise along with their user_id, public_name, and login
Base Command
box_get_users
Input
| Argument Name | Description | Required |
|---|---|---|
| filter_term | A string used to filter the results to only users starting with the filter_term in either the name or the login | Optional |
| limit | The number of records to return. The default is 100 and the max is 1000 | Optional |
| offset | The record at which to start. The default is 0 | Optional |
| user_type | The type of user to search for. Valid values are all, external or managed. If nothing is provided, the default behavior will be managed only | Optional |
| verbose | Print verbose data on each user | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| Account | unknown | Account information of users returned by query, including ID, name and username |
Command Example
#### Context Example
```json
{
"Account": [
{
"Display Name": "My Name",
"Groups": "user",
"ID": "14226607780",
"Username": "exampleuser@paloaltonetworks.com",
"type": "Box"
}
]
}
Human Readable Output
Box account users
ID Username Name Created at Status 14226607780 exampleuser@paloaltonetworks.com My Name 2020-10-29T07:49:51-07:00 active
box_update_user
Used to edit the settings and information about a user
Base Command
box_update_user
Input
| Argument Name | Description | Required |
|---|---|---|
| notify | Whether the user should receive an email when they are rolled out of an enterprise | Optional |
| enterprise | Setting this to null will roll the user out of the enterprise and make them a free user. When passing a null value, do not pass this value as a string | Optional |
| name | The name of this user | Optional |
| role | string This user’s enterprise role | Optional |
| language | The language of this user | Optional |
| is_sync_enabled | Whether or not this user can use Box Sync | Optional |
| job_title | The user’s job title | Optional |
| phone | The user’s phone number | Optional |
| address | The user’s address | Optional |
| space_amount | The user’s total available space amount in byte. A value of -1 grants unlimited storage | Optional |
| tracking_codes | An array of key/value pairs set by the user’s admin | Optional |
| can_see_managed_users | boolean Whether this user can see other enterprise users in its contact list | Optional |
| status | Can be active, inactive, cannot_delete_edit, or cannot_delete_edit_upload | Optional |
| timezone | The timezone of this user | Optional |
| is_exempt_from_device_limits | Whether to exempt this user from Enterprise device limits | Optional |
| is_exempt_from_login_verification | Whether or not this user must use two-factor authentication | Optional |
| is_password_reset_required | Whether or not the user is required to reset password | Optional |
| user_id | The user id to update | Required |
Context Output
There is no context output for this command.
Command Example
!box_update_user user_id=14226607780
Context Example
{}
Human Readable Output
User updated
ID Username Name Created at Status 14226607780 eampleuser@paloaltonetworks.com My Name 2020-09-25T16:02:17-07:00 active
box_add_user
Used to provision a new user in an enterprise
Base Command
box_add_user
Input
| Argument Name | Description | Required |
|---|---|---|
| login | The email address this user uses to login | Required |
| name | The name of this user | Required |
| role | This user’s enterprise role. Can be coadmin or user | Optional |
| language | The language of this user | Optional |
| is_sync_enabled | Whether or not this user can use Box Sync | Optional |
| job_title | The user’s job title | Optional |
| phone | The user’s phone number | Optional |
| address | The user’s address | Optional |
| space_amount | The user’s total available space amount in bytes | Optional |
| tracking_codes | An array of key/value pairs set by the user’s admin | Optional |
| can_see_managed_users | Can be active, inactive, cannot_delete_edit, or cannot_delete_edit_upload | Optional |
| timezone | The timezone of this user | Optional |
| is_exempt_from_device_limits | Whether to exempt this user from Enterprise device limits | Optional |
| is_exempt_from_login_verification | Whether or not this user must use two-factor authentication | Optional |
Context Output
There is no context output for this command.
Command Example
!box_add_user login=exampleuser@paloaltonetworks.com name="My Name"
Context Example
{}
Human Readable Output
User created
ID Username Name Created at Status 14226607780 exampleuser@paloaltonetworks.com My Name 2020-10-29T07:49:51-07:00 active
box_delete_user
Deletes a user in an enterprise account
Base Command
box_delete_user
Input
| Argument Name | Description | Required |
|---|---|---|
| notify | Determines if the destination user should receive email notification of the transfer | Optional |
| force | Whether or not the user should be deleted even if this user still own files | Optional |
| user_id | The user id to update | Required |
Context Output
There is no context output for this command.
Command Example
!box_delete_user user_id=14226607780
Context Example
{}
Human Readable Output
User deleted
success
box_move_folder
Moves all of the owned content from within one user’s folder into a new folder in another user’s account. You can move folders across users as long as the you have administrative permissions and the ‘source’ user owns the folders. To move everything from the root folder, use “0” which always represents the root folder of a Box account (Currently only moving of the root folder (0) is supported)
Base Command
box_move_folder
Input
| Argument Name | Description | Required |
|---|---|---|
| from_user_id | The ID of the user who the folder will be transferred from | Required |
| to_user_id | The ID of the user who the folder will be transferred to | Required |
Context Output
There is no context output for this command.
Command Example
!box_move_folder from_user_id=13917563262 to_user_id=14226607780
Context Example
{}
Human Readable Output
Folder moved
Content is now available in account exampleuser@paloaltonetworks.com under directory exmple@example.com - My Name’s Files and Folders (2)
box_files_get
getting a file from private Box storage
Base Command
box_files_get
Input
| Argument Name | Description | Required |
|---|---|---|
| file_id | File’s id | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| File.Name | string | Filename |
| File.Type | string | File type |
| File.Size | number | File size |
| File.MD5 | string | MD5 hash of the file |
| File.SHA1 | string | SHA1 hash of the file |
| File.SHA256 | string | SHA256 hash of the file |
Command Example
!box_files_get file_id=723447059947
Context Example
{
"File": {
"EntryID": "863@6e069bc4-2a1e-43ea-8ed3-ea558e377751",
"Extension": "boxnote",
"Info": "boxnote",
"MD5": "5bb1cfa1f61f0f5322a10c401f869919",
"Name": "Untitled Note 2020-09-25 15.56.56.boxnote",
"SHA1": "fc9ed186f1e2b4b5a93cf8d0f698a86d396b7b2f",
"SHA256": "cd98285440b5d341c7ca37d389fa5c79558e8f681c26a165573321cfc1a5f3f5",
"SHA512": "590a0bcf34b13d5b1eab9ce48f1520f75708b137b2ef31053e881915cbf4eb54a39d7c5b15b06478f5cf4b09e2cedc41e45f99b3d3f3cbfbbc7f42749acb2627",
"SSDeep": "24:Y2YuI2qFcH3KUGIwYdAYsAuhvZqwNRpLk28:YfuAe3G6sA6TpP8",
"Size": 959,
"Type": "ASCII text, with very long lines, with no line terminators"
}
}
Human Readable Output
Untitled Note 2020-09-25 15.56.56.boxnote
box_initiate
Initialising of Box’s integration
Base Command
box_initiate
Input
| Argument Name | Description | Required |
|---|---|---|
| access_code | Box’s access code (see description) | Required |
Context Output
There is no context output for this command.
Command Example
!box_initiate access_code=wOK4V7vzcljJNTFu2mSDyQq7phlFY5nx
Context Example
{}
Human Readable Output
Box initialized successfully
box_files_get_info
Getting file info of provided ID
Base Command
box_files_get_info
Input
| Argument Name | Description | Required |
|---|---|---|
| file_id | File’s ID | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| Box.Size | number | Size of file (in bits) |
| Box.ContentModifiedAt | date | Time of content modification |
| Box.Sha1 | string | File’s SHA1 |
| Box.ModifiedAt | date | Time of file info |
| Box.Parent.Etag | string | Parent’s etag |
| Box.Parent.Id | string | Parent’s ID |
| Box.Parent.Name | string | Parent’s name |
| Box.SequenceId | string | Parent’s sequence ID |
| Box.Parent.Type | string | Parent’s type |
| Box.CreatedAt | date | Time of file’s upload |
| Box.Name | string | File’s name |
| Box.ModifiedBy.Id | string | ID’s of last user modified |
| Box.ModifiedBy.Login | string | User’s login email |
| Box.ModifiedBy.Name | string | User’s name of last modified |
| Box.ModifiedBy.User | string | User’s type |
| Box.ContentCreatedAt | date | File’s time of creation |
| Box.OwnedBy.Id | string | File’s owner ID |
| Box.OwnedBy.Login | string | File’s owner email |
| Box.OwnedBy.Name | string | File’s owner name |
| Box.OwnedBy.Type | string | File’s owner type |
| Box.SharedLink | string | Shared link |
| Box.Etag | string | File’s etag |
| Box.FileVersion.Id | string | File’s version ID |
| Box.FileVersion.Sha1 | string | File’s version SHA1 |
| Box.FileVersion.Type | string | File’s version type |
| Box.PathCollection.Entries.Etag | string | Path’s collection entries etag |
| Box.PathCollection.Entries.Id | string | Path’s collection entries ID |
| Box.PathCollection.Entries.Sha1 | string | Path’s collection entries SHA1 |
| Box.PathCollection.Entries.Name | string | Path’s collection entries name |
| Box.PathCollection.Entries.SequenceId | string | Path’s collection entries sequence_id |
| Box.PathCollection.Entries.Type | string | Path’s collection entries type |
| Box.PathCollection.TotalCount | string | Size of path_collection object |
| Box.PurgedAt | string | purged at |
| Box.Type | string | File’s type |
| Box.Id | string | File’s ID |
| Box.Description | string | File’s description |
| Box.ItemStatus | string | File’s status |
Command Example
!box_files_get_info file_id=723447059947
Context Example
{
"Box": {
"ContentCreatedAt": "2020-09-25T15:56:57-07:00",
"ContentModifiedAt": "2020-09-25T16:26:54-07:00",
"CreatedAt": "2020-09-25T15:56:57-07:00",
"CreatedBy": {
"Id": "14226607780",
"Login": "eampleuser@paloaltonetworks.com",
"Name": "My Name",
"Type": "user"
},
"Description": "",
"Etag": "1",
"FileVersion": {
"Id": "769566241780",
"Sha1": "fc9ed186f1e2b4b5a93cf8d0f698a86d396b7b2f",
"Type": "file_version"
},
"Id": "723447059947",
"ItemStatus": "active",
"ModifiedAt": "2020-09-25T16:27:19-07:00",
"ModifiedBy": {
"Id": "14226607780",
"Login": "eampleuser@paloaltonetworks.com",
"Name": "My Name",
"Type": "user"
},
"Name": "Untitled Note 2020-09-25 15.56.56.boxnote",
"OwnedBy": {
"Id": "14226607780",
"Login": "eampleuser@paloaltonetworks.com",
"Name": "My Name",
"Type": "user"
},
"Parent": {
"Etag": "0",
"Id": "123342801935",
"Name": "My Box Notes",
"SequenceId": "0",
"Type": "folder"
},
"PathCollection": {
"Entries": [
"0",
"1"
],
"TotalCount": 2
},
"PurgedAt": null,
"SequenceId": "1",
"Sha1": "fc9ed186f1e2b4b5a93cf8d0f698a86d396b7b2f",
"SharedLink": null,
"Size": 959,
"TrashedAt": null,
"Type": "file"
}
}
Human Readable Output
File info
Key Value ContentCreatedAt 2020-09-25T15:56:57-07:00 ContentModifiedAt 2020-09-25T16:26:54-07:00 CreatedAt 2020-09-25T15:56:57-07:00 CreatedBy.Id 14226607780 CreatedBy.Login exampleuser@paloaltonetworks.com CreatedBy.Name My Name CreatedBy.Type user Etag 1 FileVersion.Id 769566241780 FileVersion.Sha1 fc9ed186f1e2b4b5a93cf8d0f698a86d396b7b2f FileVersion.Type file_version Id 723447059947 ItemStatus active ModifiedAt 2020-09-25T16:27:19-07:00 ModifiedBy.Id 14226607780 ModifiedBy.Login exampleuser@paloaltonetworks.com ModifiedBy.Name My Name ModifiedBy.Type user Name Untitled Note 2020-09-25 15.56.56.boxnote OwnedBy.Id 14226607780 OwnedBy.Login exampleuser@paloaltonetworks.com OwnedBy.Name My Name OwnedBy.Type user Parent.Etag 0 Parent.Id 123342801935 Parent.Name My Box Notes Parent.SequenceId 0 Parent.Type folder PathCollection.Entries.0 0 PathCollection.Entries.1 1 PathCollection.TotalCount 2 SequenceId 1 Sha1 fc9ed186f1e2b4b5a93cf8d0f698a86d396b7b2f Size 959 Type file
Configuration parameters
insecure— Trust any certificate (not secure)
Commands (9)
-
box_add_userUsed to provision a new user in an enterprise
-
box_delete_userDeletes a user in an enterprise account
-
box_files_getgetting a file from private Box storage
-
box_files_get_infoGetting file info of provided ID
-
box_get_current_userRetrieves information about the user who is currently logged in i.e. the user for whom this auth token was generated
-
box_get_usersReturns a list of all users for the Enterprise along with their user_id, public_name, and login
-
box_initiateInitialising of Box's integration
-
box_move_folderMoves all of the owned content from within one user’s folder into a new folder in another user’s account. You can move folders across users as long as the you have administrative permissions and the ‘source’ user owns the folders. To move everything from the root folder, use “0” which always represents the root folder of a Box account (Currently only moving of the root folder (0) is supported)
-
box_update_userUsed to edit the settings and information about a user
commonfields: id: Box version: -1 name: Box deprecated: true display: Box (Deprecated) category: IT Services provider: Box description: Deprecated. Use the Box v2 integration instead. configuration: - display: Trust any certificate (not secure) name: insecure type: 8 required: false script: script: '' type: javascript commands: - name: box_get_current_user arguments: - name: verbose auto: PREDEFINED predefined: - "true" - "false" description: Print verbose data on each user description: Retrieves information about the user who is currently logged in i.e. the user for whom this auth token was generated - name: box_get_users arguments: - name: filter_term description: A string used to filter the results to only users starting with the filter_term in either the name or the login - name: limit description: The number of records to return. The default is 100 and the max is 1000 - name: offset description: The record at which to start. The default is 0 - name: user_type description: The type of user to search for. Valid values are all, external or managed. If nothing is provided, the default behavior will be managed only - name: verbose auto: PREDEFINED predefined: - "true" - "false" description: Print verbose data on each user outputs: - contextPath: Account description: Account information of users returned by query, including ID, name and username description: Returns a list of all users for the Enterprise along with their user_id, public_name, and login - name: box_update_user arguments: - name: notify description: Whether the user should receive an email when they are rolled out of an enterprise - name: enterprise description: Setting this to null will roll the user out of the enterprise and make them a free user. When passing a null value, do not pass this value as a string - name: name description: The name of this user - name: role description: string This user’s enterprise role - name: language description: The language of this user - name: is_sync_enabled description: Whether or not this user can use Box Sync - name: job_title description: The user’s job title - name: phone description: The user’s phone number - name: address description: The user’s address - name: space_amount description: The user’s total available space amount in byte. A value of -1 grants unlimited storage - name: tracking_codes description: An array of key/value pairs set by the user’s admin - name: can_see_managed_users description: ' boolean Whether this user can see other enterprise users in its contact list' - name: status description: Can be active, inactive, cannot_delete_edit, or cannot_delete_edit_upload - name: timezone description: The timezone of this user - name: is_exempt_from_device_limits description: Whether to exempt this user from Enterprise device limits - name: is_exempt_from_login_verification description: Whether or not this user must use two-factor authentication - name: is_password_reset_required description: Whether or not the user is required to reset password - name: user_id required: true default: true description: The user id to update description: Used to edit the settings and information about a user - name: box_add_user arguments: - name: login required: true default: true description: The email address this user uses to login - name: name required: true description: The name of this user - name: role description: This user’s enterprise role. Can be coadmin or user - name: language description: The language of this user - name: is_sync_enabled description: Whether or not this user can use Box Sync - name: job_title description: The user’s job title - name: phone description: The user’s phone number - name: address description: The user’s address - name: space_amount description: The user’s total available space amount in bytes - name: tracking_codes description: An array of key/value pairs set by the user’s admin - name: can_see_managed_users description: Can be active, inactive, cannot_delete_edit, or cannot_delete_edit_upload - name: timezone description: The timezone of this user - name: is_exempt_from_device_limits description: Whether to exempt this user from Enterprise device limits - name: is_exempt_from_login_verification description: Whether or not this user must use two-factor authentication description: Used to provision a new user in an enterprise - name: box_delete_user arguments: - name: notify description: Determines if the destination user should receive email notification of the transfer - name: force description: Whether or not the user should be deleted even if this user still own files - name: user_id required: true default: true description: The user id to update description: Deletes a user in an enterprise account - name: box_move_folder arguments: - name: from_user_id required: true default: true description: The ID of the user who the folder will be transferred from - name: to_user_id required: true description: The ID of the user who the folder will be transferred to description: Moves all of the owned content from within one user’s folder into a new folder in another user’s account. You can move folders across users as long as the you have administrative permissions and the ‘source’ user owns the folders. To move everything from the root folder, use “0” which always represents the root folder of a Box account (Currently only moving of the root folder (0) is supported) - name: box_files_get arguments: - name: file_id required: true description: File's id outputs: - contextPath: File.Name description: Filename type: string - contextPath: File.Type description: File type type: string - contextPath: File.Size description: File size type: number - contextPath: File.MD5 description: MD5 hash of the file type: string - contextPath: File.SHA1 description: SHA1 hash of the file type: string - contextPath: File.SHA256 description: SHA256 hash of the file type: string description: getting a file from private Box storage - name: box_initiate arguments: - name: access_code required: true description: Box's access code (see description) description: Initialising of Box's integration - name: box_files_get_info arguments: - name: file_id required: true description: File's ID outputs: - contextPath: Box.Size description: Size of file (in bits) type: number - contextPath: Box.ContentModifiedAt description: Time of content modification type: date - contextPath: Box.Sha1 description: File's SHA1 type: string - contextPath: Box.ModifiedAt description: Time of file info type: date - contextPath: Box.Parent.Etag description: Parent's etag type: string - contextPath: Box.Parent.Id description: Parent's ID type: string - contextPath: Box.Parent.Name description: Parent's name type: string - contextPath: Box.SequenceId description: Parent's sequence ID type: string - contextPath: Box.Parent.Type description: Parent's type type: string - contextPath: Box.CreatedAt description: Time of file's upload type: date - contextPath: Box.Name description: File's name type: string - contextPath: Box.ModifiedBy.Id description: ID's of last user modified type: string - contextPath: Box.ModifiedBy.Login description: User's login email type: string - contextPath: Box.ModifiedBy.Name description: User's name of last modified type: string - contextPath: Box.ModifiedBy.User description: User's type type: string - contextPath: Box.ContentCreatedAt description: File's time of creation type: date - contextPath: Box.OwnedBy.Id description: File's owner ID type: string - contextPath: Box.OwnedBy.Login description: File's owner email type: string - contextPath: Box.OwnedBy.Name description: File's owner name type: string - contextPath: Box.OwnedBy.Type description: File's owner type type: string - contextPath: Box.SharedLink description: Shared link type: string - contextPath: Box.Etag description: File's etag type: string - contextPath: Box.FileVersion.Id description: File's version ID type: string - contextPath: Box.FileVersion.Sha1 description: File's version SHA1 type: string - contextPath: Box.FileVersion.Type description: File's version type type: string - contextPath: Box.PathCollection.Entries.Etag description: Path's collection entries etag type: string - contextPath: Box.PathCollection.Entries.Id description: Path's collection entries ID type: string - contextPath: Box.PathCollection.Entries.Sha1 description: Path's collection entries SHA1 type: string - contextPath: Box.PathCollection.Entries.Name description: Path's collection entries name type: string - contextPath: Box.PathCollection.Entries.SequenceId description: Path's collection entries sequence_id type: string - contextPath: Box.PathCollection.Entries.Type description: Path's collection entries type type: string - contextPath: Box.PathCollection.TotalCount description: Size of path_collection object type: string - contextPath: Box.PurgedAt description: purged at type: string - contextPath: Box.Type description: File's type type: string - contextPath: Box.Id description: File's ID type: string - contextPath: Box.Description description: File's description type: string - contextPath: Box.ItemStatus description: File's status type: string description: Getting file info of provided ID tests: - No test fromversion: 5.0.0