Connecting Boxedit

Box is a cloud-based storage service for organizations of all sizes, allowing teams to create, store, share and automatically synchonize documents across desktop, web and mobile.

Workplace Search syncs the following data from Box:

Object Fields

Folder

created_at created_by id path size status title type updated_at updated_by url

File

created_at created_by extension id mime_type path size status title type updated_at updated_by url

Configure Boxedit

Before connecting Box, you must configure Box. Complete the following steps only once per Workplace Search deployment:


Step 1. Log in to your Box developer console, where you will register your Workplace Search deployment as an OAuth application within the Box ecosystem.

Navigate to the following URL, substituting <BOX_BASE_URL> with the base URL at which your Box service is hosted (scheme + host, no path).

<BOX_BASE_URL>/developers/console

For example:

https://acme.app.box.com/developers/console

Log in to Box with the account that should own the OAuth application. This account must have permission to create an OAuth application through the Box UI. Choose an account to which you won’t lose access, such as a team-owned account.


Step 2. Create a new Box app.

From the developer console, choose Create New App.

box create new app

From the Create New App screen, choose Custom App:

box custom app button

which opens the Custom App form.

box custom app form empty

Step 3. Complete the custom app form.

Within Authentication Method, choose User Authentication (OAuth 2.0).

Within App Name, enter a name, such as "Elastic Workplace Search" or "Workplace Search Your Org Name". Box will display this name later, when asking permission to connect to Workplace Search.

box custom app form complete

Choose Create App to save the app, after which you arrive at the app’s configuration screen.

box configuration

Step 4. Configure the app.

Within OAuth 2.0 Redirect URI, enter the following URL, substituting <WS_BASE_URL> with the base URL at which Workplace Search is hosted (scheme + host, no path).

<WS_BASE_URL>/ws/org/sources/box/create

Examples:

# Deployment using a custom domain name
https://www.example.com/ws/org/sources/box/create

# Deployment using a default Elastic Cloud domain name
https://c3397e558e404195a982cb68e84fbb42.ent-search.us-east-1.aws.found.io/ws/org/sources/box/create

# Unsecured local development environment
http://localhost:3002/ws/org/sources/box/create
box redirect uri

Within Application Scopes, ensure the following scopes are selected:

  • Read all files and folders stored in Box
  • Read and write all files and folders stored in Box
  • Manage enterprise properties
box scopes

Choose Save Changes to save the configuration.

box save configuration

Step 5. Copy the client ID and client secret to Workplace Search.

Within the Box application configuration screen, locate the section OAuth 2.0 Credentials.

box credentials

You need to copy the Client ID and Client Secret to Workplace Search. Either record those values, or keep this page open while you continue.

Navigate to Workplace Search and log in to the administrative dashboard.

Choose Sources, locate Box, and select Configure.

Within Client id and Client secret, enter the corresponding values from the Box developer console.

Choose Save configuration to complete the process.


With Box configured, you’re ready to connect Box accounts to Workplace Search.

Connect Boxedit

After configuring Box, you can connect Box to Workplace Search. Complete the following steps for each Box account you’d like to connect to your Workplace Search deployment:


Step 1. Navigate to Workplace Search and log in to the administrative dashboard.

Choose Sources.

Within Configured content sources, locate Box.

Choose Connect.


Step 2. Complete the authentication flow with Box.

box connect account

Use the Box account whose data you want to sync to Workplace Search. To support incremental syncs, this account must be a Box admin.

Upon completion, you are redirected back to Workplace Search.


After connecting, Box data begins syncing to Workplace Search. As it syncs, the content is searchable.

After an initial full sync, incremental syncs will run every 2 hours.

Document-level permissionsedit

You can synchronize document access permissions from Box to Workplace Search. This will ensure the right people see the right documents.

See Document-level permissions for Box.