# Managing access

> The **Manage Access** module enables you to manage user roles for an entity in your Data Service tenant. This extensive and granular permission model allows you to integrate all your business users using the service, based on their level of expertise, and your business requirements. Furthermore, you can select users or groups from your organization and assign roles to them.
:::note
Data Service is configured such that organization users can read data by default, via the **Everyone** group.

## Overview

The **Manage Access** module enables you to manage user roles for an entity in your Data Service tenant. This extensive and granular permission model allows you to integrate all your business users using the service, based on their level of expertise, and your business requirements. Furthermore, you can select users or groups from your organization and assign roles to them.
:::note
Data Service is configured such that organization users can read data by default, via the **Everyone** group.

To limit data access, manage permissions and ensure that only relevant users have the **Read** permission**.** Further, add users or groups that need access, and assign them the desired roles.
:::

The following steps enable you to manage your users and groups:

1. On the **Data Service** tab, select the **More options** menu in the upper right corner.
2. Select **Manage Access**. The **Manage Access** page is displayed.

The following tabs are available:

| Tab | Description |
| --- | --- |
| Role Assignments | Contains a list of all the users and groups that are defined for your current tenant and their associated **Roles**. Use the **Assign Role** button to create and update role assignments. |
| Roles | A list of all the **Roles** defined for the **Data Service**. For each role you can see the number of user or group assignments. Use the **Create New Role** button to create new roles, and the **Edit Role** button to update roles. |

## Standard Roles

Standard Roles have a predefined set of permissions. The following standard roles can be assigned to Data Service users:

* Administrator
* Data Reader
* Data Writer
* Designer
:::note
You cannot remove standard roles.
:::

### Standard role permissions

Each standard role has a different set of permissions, including at least one administrative permission and a data access permission.

#### Administrative permissions

Below is a description of the **administrative permissions** for a standard role.

| Permission | Roles with this permission... |
| --- | --- |
| Manage Permissions | ... can create new roles, edit and delete existing roles, and assign one or more roles to users or groups. |
| View All Schema | ... can view the schema of all entities and choice set definitions, but cannot modify them. |
| Customize All Schema | ... can view, create, edit, or delete the schema of all entities and choice set definition. |
:::note
**View all Schema** and **Customize All Schema** are applicable only to entities with role-based access enabled.
:::

#### Data access permissions

Below is a description of the **Data access permissions** of a standard role.

| Permission | Roles with this permission... |
| --- | --- |
| No access | ... do not have access to any entity data. Users or groups with this permission are not allowed to create, read, edit, or delete data records of an entity. |
| Read access for all Entities | ... can view the data records of an entity. |
| Complete read and write access for all Entities | ... can create, view, edit, and delete data records of an entity. |

### Overview of Standard Role Permissions

The following table summarizes the default permissions of each standard role:

| Standard role | Administrative Permissions | Data Access Permissions |
| --- | --- | --- |
| Administrator | Manage Permissions | No access |
| Data Reader | View All Schema | Read access for all Entities |
| Data Writer | View All Schema | Complete read and write access for all Entities |
| Designer | View All Schema  Customize Schema | No access |

## Custom roles

Custom roles enable you to create custom sets of permissions that can be assigned to users or groups.

To create new custom roles, you need to have the **Manage Permissions** permission assigned.

### Custom Role Permissions

For custom roles you can decide which permissions you want to assign to the role.

At creation, we recommend you assign at least one **Administrative Permission** to the new role. Consequently, you may assign **Data Access Permissions** to the role, which grants **Create**, **Read**, **Edit**, or **Delete** permissions on the specified entities.

#### Administrative Permissions

Below is a description of the **Administrative Permissions** that can be assigned to a custom role.

| Permission | Roles with this permission... |
| --- | --- |
| Manage Roles | ... can create new roles, edit and delete existing roles, and assign one or more roles to Users/Groups. |
| View Schema | ... can view the schema of all entities and choice set definitions, but cannot modify them. |
| Customize Schema | ... can view, create, edit, or delete the schema of all entities and choice set definition. |
:::note
**View all Schema** and **Customize All Schema** are applicable only to entities with role-based access enabled.
:::

#### Data Access Permissions

When defining a custom role, you can assign different data access permissions for the selected entities in the tenant.

For entities with role-based access control enabled, you can select whether the custom role can create, read, edit, or delete the entity records. Moreover, if an entity has **Role based field access** enabled fields, you can assign data access permissions to each entity field.

Below is a description of the **Data Access Permissions** for an entity that can be assigned to a Custom Role.

| Permission | Roles with this permission... |
| --- | --- |
| Create | ... can create entity records. |
| Read | ... can view entity records. |
| Edit | ... can view and modify entity records. |
| Delete | ... can view and delete entity records. |

### Creating custom roles

To create a new role:

1. On the **Roles** tab, select **Create new role**.
2. In the **Create Role** panel, enter a name for the new role in the **Role Name** field.
3. Select the **Administrative Permissions** that you want assign to the role.
4. To add **Data Access Permissions** to the role, select the targeted entity:
   * Select **Add Entity** to display the available entities.
   * Select the entity for which you want to define the permissions.
   * Select the desired permissions. By default, the **Read** permissions is enabled.
5. Select **Save** to create the new custom role. The role is displayed in the **Roles** tab, of **Type**—**Custom**.

#### Setting permissions for specific fields

When creating entities it is possible to enable **Role based field access** for user-created fields. When defining a custom role, you may assign data access permissions to these fields.
:::note
Only custom roles can be updated to grant permissions to access the data in the fields.
:::

Follow the steps below to set role based field permissions:

1. Create a new role, or edit an existing custom role.
2. If the entity has **Role based field access** enabled fields, a message indicating to add data access permissions is displayed: **Certain fields require data access permissions**. Select **Add them**.
3. From the drop-down list, select the fields for which you want to set data access permissions.
4. Set the desired permissions: Create, Read, Edit, or Delete.
5. Click **Save**.

See also [Customizing an Entity](https://docs.uipath.com/data-service/automation-suite/2.2510/user-guide/customizing-an-entity#customizing-an-entity) .
:::note
If you do not configure permissions for fields where you enabled **Role based field access,** they will not be visible by default.
:::

## Editing custom roles

You may change your mind about specific permissions for a custom role. You can edit custom roles by selecting the corresponding **Edit** button.

## Removing custom roles

If you decide you no longer need a custom role, you can remove it by selecting the corresponding **Delete** button.
:::note
You cannot remove [standard roles](https://docs.uipath.com/data-service/automation-suite/2.2510/user-guide/managing-access#standard-roles).
:::

## Adding Users or Groups

All calls in the Data Service are based on user authorization. The decision to grant or deny an operation is always based on the effective permissions for the user based on their individual or group membership permission grants. **Studio**, **Assistant**, and **Robot** also inherit permissions based on their configured users.

Data Service supports all users and groups defined in the organization and doesn’t maintain a separate user list.

To add users that are part of your organization, follow the below steps:

1. In the **Manage Access** page, select **Assign Roles**. The **Assign Roles** panel opens.
2. In the **Names** field, type in the name of the users or groups you want to add.
3. Select the **Roles** you want to assign to the users or groups.
4. Select **Save**.
   :::note
   If you cannot find a user, it means they do not have an account within the organization.
   :::

The newly added users and the assigned roles are displayed in the **User/Group** list of the **Role Assignments** tab.

## Defining Roles for a User or Group

A group is a collection of user accounts. Data Service supports all groups defined in the account and does not maintain a separate list of groups. A permission granted to a group propagates to all users and groups.

To define the roles for a user or group follow the below steps:

1. In the **Role Assignments** tab, hover over the user or group you want to assign roles to.
2. Select the **Edit** icon available on the right-hand side. The **Edit Roles** panel opens.
3. Select the desired **Roles** for the user or group.
4. Select **Save**.
   :::note
   You can assign multiple roles to a user or group. In this case, union of the permissions applies.
   :::

## Default Group Mapping

Groups are user containers with specific permission sets. Permissions for groups can be configured inside each service by selecting the group and associating the desired permissions. Users get the union of all permissions assigned to the groups they are members in.

When you assign users to a group, you grant them access to all the services which have permissions configured for that specific user group. The level of access to the service is determined by the roles assigned to that group at the service level.

| Group Membership | Organization Level Role | Data Service Roles |
| --- | --- | --- |
| Administrators | **Organization Administrator** | [Administrator, Designer and Data Writer](https://docs.uipath.com/data-service/automation-suite/2.2510/user-guide/managing-access#overview-of-standard-role-permissions) |
| Automation Developers | **User** | [Designer and Data Writer](https://docs.uipath.com/data-service/automation-suite/2.2510/user-guide/managing-access#overview-of-standard-role-permissions) |
| Automation Users | **User** | [Data Writer](https://docs.uipath.com/data-service/automation-suite/2.2510/user-guide/managing-access#overview-of-standard-role-permissions) |
| Everyone | **User** | [Data Reader](https://docs.uipath.com/data-service/automation-suite/2.2510/user-guide/managing-access#overview-of-standard-role-permissions) |

## Removing Users or Groups

Removing users or groups from the **Role Assignments** tab implies the inability to access Data Service. That is, every deleted user and users part of the deleted group cannot access Data Service anymore.

To allow access once again, [add organization users or groups](https://docs.uipath.com/data-service/automation-suite/2.2510/user-guide/managing-access#adding-users-or-groups) individually, and assign them Data Service roles.

To remove a user or a group from Data Service, click the corresponding **Remove user/group**![](https://dev-assets.cms.uipath.com/assets/images/data-service/data-service-image-Minus_Circle-dc337e6f-15a5a349.png) button.

## Role-based record access

Role-based record access allows you to restrict access to specific records in your Data Service entity.
:::note
Role-based record access restricts data access at the record level.

[**Role based field access**](https://docs.uipath.com/data-service/automation-suite/2.2510/user-guide/customizing-an-entity#enabling-or-disabling-role-based-field-access) restricts data access at the field level.
:::

### The Owner system field

When you enable **Role-based record access**, Data Service adds the **RecordOwner** field to your entity.

The **RecordOwner** field is a system field which specifies the user or group that owns the record. When the record is created, Data Service assigns the creator of the record as the **RecordOwner** by default.

In addition, when you enable **Role-based record access**, Data Service adds an access level to your roles: **Read/Edit/Delete own**. This access level limits the role to only operate on records they are the record **Owner** for.

For example, if you create an entity for a scenario involving an application form:

* You can assign the **Can create, Read all, Edit all,** and **Delete all** access levels for a manager.
* You can assign the **Cannot create, Read all, Edit own** and **Cannot Delete** access levels for a review agent.

### Enabling or disabling role-based record access for an entity

You can enable role-based record access when you create an entity, or by editing an existing entity.

#### Enabling role-based record access for a new entity

To enable **Role-based record access** for a new entity, take the following steps:

1. Go to Data Service.
2. Select **Create New Entity.**
3. Give your entity a **Name** and **Description**.
4. Select **Enable role-based record access**.
5. Select **Save.**

A pop-up opens and prompts you to access **Manage Access** to configure custom roles.

#### Enabling or disabling role-based record access for an existing entity

To enable or disable **Role-based record access** for an existing entity, take the following steps:

1. Go to Data Service.
2. Select **Entities** to view all entities.
3. Select the **Edit** button adjacent to a non-system entity.
4. Select **Role-based record access**.
   :::note
   You can currently only enable **Role-based record access** for entities without any existing records.
   :::
5. Select **Save.**

The Role-based record access slider is a context-sensitive toggle:

* If you select **Role-based record access** for an entity without this feature active, Data Service enables the feature.
* If you select **Role-based record access** for an entity with this feature already active, Data Service disables the feature.
