# Assigning & Removing Users & Groups from Document Roles Using Vault Loader

When using [Vault Loader](/en/lr/26597/), the **Document Roles** selection lets you assign users to or remove users from roles on specific documents.

## How to Load Document Roles

Before loading document roles, [prepare a CSV input file][2] containing field names and values.

To load document roles:

  1. In the left panel of the **Loader** tab, click **Load**.
  2. For the **CSV File**, click **Choose** and select the CSV input file.
  3. In the **Entity Type** picklist, select **Document Roles**.
  4. In the **Action Type** picklist, select **Update** or **Delete**.
  5. In the **Key Field** drop-down, select the **ID** field. This option is required for the _Update_ and _Delete_ actions.
  6. Click **Start Load**.

Vault begins processing the request. When finished, you'll receive a Vault notification and email with request details and CSV output files.

## Preparing the CSV Input File {#preparing}

To assign users to a given role, your column header must include the name of the document lifecycle role and either "users" to indicate that the values are specific user IDs or "groups" to indicate group IDs: `{role__c}.{users/groups}`. The first column must be the document ID.

<table style="width: 476px;">
  <tr style="height: 24px;">
    <td style="height: 24px; width: 27px;">
      id
    </td>
    <td style="height: 24px; width: 138px;">
      reviewers__c.users
    </td>
    <td style="height: 24px; width: 149px;">
      reviewers__c.groups
    </td>
    <td style="height: 24px; width: 130px;">
      editors__c.groups
    </td>
  </tr>
  <tr style="height: 24.625px;">
    <td style="height: 24.625px; width: 27px;">
      346
    </td>
    <td style="height: 24.625px; width: 138px;">
      61584, 61531
    </td>
    <td style="height: 24.625px; width: 149px;">
      29
    </td>
    <td style="height: 24.625px; width: 130px;">
      35
    </td>
  </tr>
  <tr style="height: 24.625px;">
    <td style="height: 24.625px; width: 27px;">
      320
    </td>
    <td style="height: 24.625px; width: 138px;">
      61584,61531
    </td>
    <td style="height: 24.625px; width: 149px;">
    </td>
    <td style="height: 24.625px; width: 130px;">
    </td>
  </tr>
</table>

## Retrieving Document Roles

You can see all available roles for a document lifecycle from **Admin** > **Configuration** > **Document Lifecycles** > [Lifecycle] > **Roles**.

## Retrieving User & Group IDs

The easiest way to get the lists of user and group IDs with corresponding names is to extract them using Vault Loader.

## Document Role Assignment Rules

Assigning users and groups to document roles is additive in all cases except single-user roles. If you add a single-user role (_owner\_\_v_ or _coordinator\_\_c_), you can only specify a single user.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: In cases where the column header defined role does not match the data specified, the current behaviour is to ignore unknown values and return success.</p>
    </div>
  </div>
</div>



## Invalid Input

Loader ignores users and groups in the input that are either invalid (not recognized or inactive) or are not allowed users.

Loader also ignores role names that are not available on the specified document.

 [1]: /wordpress/26597
 [2]: #preparing
