Skip to main content

Box (Deprecated)

This Integration is part of the Box Pack.#

Deprecated

Use the Box v2 integration instead.

Deprecated. Use the Box v2 integration instead.

Configure Box on Cortex XSOAR#

  1. Navigate to Settings > Integrations > Servers & Services.
  2. Search for Box.
  3. Click Add instance to create and configure a new integration instance.
ParameterDescriptionRequired
insecureTrust any certificate (not secure)False
  1. Click Test to validate the URLs, token, and connection.

How to initialize the Box integration:#

Note: The following steps should be done in less than 30 seconds due to Box security.

  1. Create a new Box instance. Do not click Test.
  2. 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)
  3. Click Grant access to Box. Allow access to it using your box credentials.
  4. You will be redirected to a non active page, with a url in this form: https://localhost/?state=lulubalulu&code=MCTNCsN1gJIjA2cEJ72nczpXzcLVVQxJ
  5. Copy the code from the url and use it the next step. (For example, copy MCTNCsN1gJIjA2cEJ72nczpXzcLVVQxJ)
  6. 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 Cortex XSOAR 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 NameDescriptionRequired
verbosePrint verbose data on each userOptional

Context Output#

There is no context output for this command.

Command Example#

!box_get_current_user

Context Example#

{}

Human Readable Output#

Box account current user#

IDUsernameNameCreated atStatus
14226607780exampleuser@paloaltonetworks.comMy Name2020-09-25T15:23:39-07:00active

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 NameDescriptionRequired
filter_termA string used to filter the results to only users starting with the filter_term in either the name or the loginOptional
limitThe number of records to return. The default is 100 and the max is 1000Optional
offsetThe record at which to start. The default is 0Optional
user_typeThe type of user to search for. Valid values are all, external or managed. If nothing is provided, the default behavior will be managed onlyOptional
verbosePrint verbose data on each userOptional

Context Output#

PathTypeDescription
AccountunknownAccount information of users returned by query, including ID, name and username

Command Example#

!box_get_users

Context Example#

{
"Account": [
{
"Display Name": "My Name",
"Groups": "user",
"ID": "14226607780",
"Username": "exampleuser@paloaltonetworks.com",
"type": "Box"
}
]
}

Human Readable Output#

Box account users#

IDUsernameNameCreated atStatus
14226607780exampleuser@paloaltonetworks.comMy Name2020-10-29T07:49:51-07:00active

box_update_user#


Used to edit the settings and information about a user

Base Command#

box_update_user

Input#

Argument NameDescriptionRequired
notifyWhether the user should receive an email when they are rolled out of an enterpriseOptional
enterpriseSetting 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 stringOptional
nameThe name of this userOptional
rolestring This user’s enterprise roleOptional
languageThe language of this userOptional
is_sync_enabledWhether or not this user can use Box SyncOptional
job_titleThe user’s job titleOptional
phoneThe user’s phone numberOptional
addressThe user’s addressOptional
space_amountThe user’s total available space amount in byte. A value of -1 grants unlimited storageOptional
tracking_codesAn array of key/value pairs set by the user’s adminOptional
can_see_managed_usersboolean Whether this user can see other enterprise users in its contact listOptional
statusCan be active, inactive, cannot_delete_edit, or cannot_delete_edit_uploadOptional
timezoneThe timezone of this userOptional
is_exempt_from_device_limitsWhether to exempt this user from Enterprise device limitsOptional
is_exempt_from_login_verificationWhether or not this user must use two-factor authenticationOptional
is_password_reset_requiredWhether or not the user is required to reset passwordOptional
user_idThe user id to updateRequired

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#

IDUsernameNameCreated atStatus
14226607780eampleuser@paloaltonetworks.comMy Name2020-09-25T16:02:17-07:00active

box_add_user#


Used to provision a new user in an enterprise

Base Command#

box_add_user

Input#

Argument NameDescriptionRequired
loginThe email address this user uses to loginRequired
nameThe name of this userRequired
roleThis user’s enterprise role. Can be coadmin or userOptional
languageThe language of this userOptional
is_sync_enabledWhether or not this user can use Box SyncOptional
job_titleThe user’s job titleOptional
phoneThe user’s phone numberOptional
addressThe user’s addressOptional
space_amountThe user’s total available space amount in bytesOptional
tracking_codesAn array of key/value pairs set by the user’s adminOptional
can_see_managed_usersCan be active, inactive, cannot_delete_edit, or cannot_delete_edit_uploadOptional
timezoneThe timezone of this userOptional
is_exempt_from_device_limitsWhether to exempt this user from Enterprise device limitsOptional
is_exempt_from_login_verificationWhether or not this user must use two-factor authenticationOptional

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#

IDUsernameNameCreated atStatus
14226607780exampleuser@paloaltonetworks.comMy Name2020-10-29T07:49:51-07:00active

box_delete_user#


Deletes a user in an enterprise account

Base Command#

box_delete_user

Input#

Argument NameDescriptionRequired
notifyDetermines if the destination user should receive email notification of the transferOptional
forceWhether or not the user should be deleted even if this user still own filesOptional
user_idThe user id to updateRequired

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 NameDescriptionRequired
from_user_idThe ID of the user who the folder will be transferred fromRequired
to_user_idThe ID of the user who the folder will be transferred toRequired

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@paloaltonetworks.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 NameDescriptionRequired
file_idFile's idRequired

Context Output#

PathTypeDescription
File.NamestringFilename
File.TypestringFile type
File.SizenumberFile size
File.MD5stringMD5 hash of the file
File.SHA1stringSHA1 hash of the file
File.SHA256stringSHA256 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 NameDescriptionRequired
access_codeBox'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 NameDescriptionRequired
file_idFile's IDRequired

Context Output#

PathTypeDescription
Box.SizenumberSize of file (in bits)
Box.ContentModifiedAtdateTime of content modification
Box.Sha1stringFile's SHA1
Box.ModifiedAtdateTime of file info
Box.Parent.EtagstringParent's etag
Box.Parent.IdstringParent's ID
Box.Parent.NamestringParent's name
Box.SequenceIdstringParent's sequence ID
Box.Parent.TypestringParent's type
Box.CreatedAtdateTime of file's upload
Box.NamestringFile's name
Box.ModifiedBy.IdstringID's of last user modified
Box.ModifiedBy.LoginstringUser's login email
Box.ModifiedBy.NamestringUser's name of last modified
Box.ModifiedBy.UserstringUser's type
Box.ContentCreatedAtdateFile's time of creation
Box.OwnedBy.IdstringFile's owner ID
Box.OwnedBy.LoginstringFile's owner email
Box.OwnedBy.NamestringFile's owner name
Box.OwnedBy.TypestringFile's owner type
Box.SharedLinkstringShared link
Box.EtagstringFile's etag
Box.FileVersion.IdstringFile's version ID
Box.FileVersion.Sha1stringFile's version SHA1
Box.FileVersion.TypestringFile's version type
Box.PathCollection.Entries.EtagstringPath's collection entries etag
Box.PathCollection.Entries.IdstringPath's collection entries ID
Box.PathCollection.Entries.Sha1stringPath's collection entries SHA1
Box.PathCollection.Entries.NamestringPath's collection entries name
Box.PathCollection.Entries.SequenceIdstringPath's collection entries sequence_id
Box.PathCollection.Entries.TypestringPath's collection entries type
Box.PathCollection.TotalCountstringSize of path_collection object
Box.PurgedAtstringpurged at
Box.TypestringFile's type
Box.IdstringFile's ID
Box.DescriptionstringFile's description
Box.ItemStatusstringFile'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:#

KeyValue
ContentCreatedAt2020-09-25T15:56:57-07:00
ContentModifiedAt2020-09-25T16:26:54-07:00
CreatedAt2020-09-25T15:56:57-07:00
CreatedBy.Id14226607780
CreatedBy.Loginexampleuser@paloaltonetworks.com
CreatedBy.NameMy Name
CreatedBy.Typeuser
Etag1
FileVersion.Id769566241780
FileVersion.Sha1fc9ed186f1e2b4b5a93cf8d0f698a86d396b7b2f
FileVersion.Typefile_version
Id723447059947
ItemStatusactive
ModifiedAt2020-09-25T16:27:19-07:00
ModifiedBy.Id14226607780
ModifiedBy.Loginexampleuser@paloaltonetworks.com
ModifiedBy.NameMy Name
ModifiedBy.Typeuser
NameUntitled Note 2020-09-25 15.56.56.boxnote
OwnedBy.Id14226607780
OwnedBy.Loginexampleuser@paloaltonetworks.com
OwnedBy.NameMy Name
OwnedBy.Typeuser
Parent.Etag0
Parent.Id123342801935
Parent.NameMy Box Notes
Parent.SequenceId0
Parent.Typefolder
PathCollection.Entries.00
PathCollection.Entries.11
PathCollection.TotalCount2
SequenceId1
Sha1fc9ed186f1e2b4b5a93cf8d0f698a86d396b7b2f
Size959
Typefile