Scopes - Box Dev Docs (original) (raw)

When an application is created in the Developer Console, the user must configure application scopes. Similar to how users have permissions to access files and folders within Box, applications have their own set of permissions to perform certain actions on behalf of a Box user or a Box enterprise. The name for a set of permissions for an application is a “scope”. In short, an application’s scopes determine which an application can successfully call and are reflected in the access provided by of the application.

User permissions and scopes

It is important to understand that even if an application has the right scopes to perform an action, the user associated with the Access Token making the call needs to have permission to perform the action as well and vice versa. For example, if your application is set up to read files, the authenticated user does need to have permission to read the file you are trying to access. To learn more about how scopes, token permissions, and user permissions work together, see our .

When sending a user through a client-side OAuth 2 flow to authorize your application it is possible to append a set of scopes to the authorization URL to further restrict the user’s access token. For example, if you application has the root_readonly and root_readwritescopes enabled, it is possible to restrict a user’s access token toroot_readonly by specifying this scope when redirecting the user.

GET https://account.box.com/api/oauth2/authorize?scope=root_readonly&client_id=....

When the scope parameter is omitted the application will use the scopes that were set when the application was created.

Self-service scopes

These scopes are available through the Developer Console when configuring an application. Navigate to the Application Scopes section of theConfiguration tab and select one or more of the following scope.

Read all files and folders

OAuth Scope root_readonly
Application Scope Read all files and folders stored in Box

Gives an application the ability to read all the files/folders for the authenticated user. Although this gives an application the permission to read files and folders, the user making the API call does need to have access to the items being accessed. In the case of a application accessing a items, the Service Account’s Token will need to either use the as-user or create a to directly authenticate as the user who has access to the content.

Read and write all files and folders

OAuth Scope root_readwrite
Application Scope Read and write all files and folders stored in Box

Gives an application write access for the authenticated user. This allows the application to upload files or new file versions, download content, create new folders, update or delete collaborations, create comments or tasks, and more. Although this gives an application read/write access to items, the user making the API call needs to have access to the content.

Manage users

The manage users scope in the Developer Console maps to two OAuth scopes.

OAuth Scope manage_managed_users
Application Scope Manage users

Gives an application permission to manage . It allows the app to change the user’s primary login, reset their password, and change roles for managed users.

OAuth Scope manage_app_users
Application Scope Manage users

Gives an application permission to manage , which means this scope only applies to server-side authenticated (JWT) applications.

Manage groups

OAuth Scope manage_groups
Application Scope Manage groups

Gives an application permission to manage an enterprise’s groups. It allows the app to create, update, and delete groups, as well as manage group membership.

Manage webhooks

OAuth Scope manage_webhook
Application Scope Manage webhooks

Gives an application permission to create webhooks for a user. Please review webhook . Most notably, there is a limit of 1000 webhooks per application, per user.

Manage enterprise properties

OAuth Scope manage_enterprise_properties
Application Scope Manage enterprise properties

Gives an application permission to view the enterprise event stream, as well as view and edit the enterprise’s attributes and reports. It also allows the application to edit and delete device pins.

Manage retention policies

OAuth Scope manage_data_retention
Application Scope Manage retention policies
Depends on enterprise_content-scope

Gives an application permission to view and create retention policies with Box Governance. This requires the enterprise to have purchasedBox Governance.

Manage signature requests

OAuth Scope sign_requests.readwrite
Application Scope Manage signature requests

Gives an application permission to get, create, cancel, and resend sign requests. This scope requires the application to also have read/write scopes, which are automatically selected when enabled. In addition, an enterprise must have Sign enabled.

Manage Box AI API

OAuth Scope ai.readwrite
Application Scope Manage AI

Gives an application permission to send requests to Box AI API.

Manage Box Relay

OAuth Scope manage_triggers
Application Scope Manage Box Relay

Gives an application permission to get workflows and start flows of type WORKFLOW_MANUAL_START This scope requires the application to also have read/write scopes.

Available on request

There are some additional scopes that are only available upon request. To do so, please submit a ticket to our support team. They will review these requests on an individual basis and only provide approval if the use case requires the scope.

OAuth Scope manage_legal_holds
Depends on enterprise_content-scope

Gives an application permission to view and create retention policies with Box Governance. This requires the enterprise to have purchased Box Governance.

Suppress email notifications

Application Scope Can suppress email notifications from API calls

Allows some types of to be suppressed when API calls are made.

Global Content Manager (GCM)

OAuth Scope enterprise_content
Application Scope Global Content Manager

Allows Admins, Co-Admins, and to retrieve any content they do not own or are not collaborators on within their enterprise, based on their enterprise settings. This scope is required to manage the retention policies and legal holds.

Scopes for downscoping

In some cases an Access Token needs to be to a more strict permission level, especially when a token needs to be exposed to a client-side, public environment like a browser. The primary example for this is when usingBox UI Elements, which require an Access Token in the user’s browser. The following is a list of additional scopes that can be used with the endpoint to downscope an existing access token.

OAuth Scope UI Element affected Description
annotation_edit Preview Allow user to edit & delete annotations
annotation_view_all Preview Allows user to view annotations by all users
annotation_view_self Preview Allows user to view their own annotations only
base_explorer Explorer Allows access to content in the folder tree based on user/file/token permissions
base_picker Picker Allows access to content in the folder tree based on user/file/token permissions
base_preview Preview Allows the user to preview the file, nothing else
base_sidebar Sidebar Allows the user to get basic file info needed for the sidebar UI element
base_upload Uploader Allows upload into the folder specified under resource when downscoping the token
item_delete Explorer Allows files and folders to be deleted
item_download Explorer, Preview Allows files or a folder’s content to be downloaded
item_preview Explorer Enables preview of a file
item_rename Explorer Allows files and folders to be renamed
item_share Explorer, Picker Allows the item specified under resource of the token exchange to be shared
item_upload Picker Allows upload in the content picker

The standard OAuth scopes are also supported when downscoping.

OAuth Scope Description
ai.readwrite Manage AI API
manage_managed_users Manage managed users
manage_app_users Manage app users
manage_data_retention Manage retention policies
manage_enterprise_properties Manage enterprise properties
manage_groups Manage groups
manage_webhook Manage webhooks
sign_requests.readwrite Manage sign requests