# Assign a role to a user

## Overview

[Video: Assign a role to a user](https://www.youtube.com/watch?v=P9E_AaHx4Ds)

This flow describes how to link a user to an organization, a responsibility or a department, and give that user a [role](https://docs.ohc.network/concepts/access-governance/access-control.md). The link and the role together give the user access there.

Note: To create a user account, see [Create a user](https://docs.ohc.network/flows/access-governance/user/create-user.md). This flow covers only users who already have an account.

## Pre-requisites

* The user that you want to link has a Care account.
* If you link the user to an organization, the organization is on the **Governance** tab of your dashboard.
* If you link the user to a responsibility, you belong to that responsibility.
* If you link the user to a department, you belong to a department of that facility.
* If you link the user to an organization or a responsibility, the user is not yet linked there. The user is also not linked to its parent or child organizations.
* You have the permissions listed below.

## Permissions

| Permission | Access |
| - | - |
| Can Manage Users in an Organization | Lets you link a user to an organization or a responsibility. For an organization, hold it in that organization or in a parent organization. For a responsibility, hold it in that responsibility. By default, Administrator holds it in an organization. In a responsibility, Admin holds it by default. |
| Can Manage Users in a Facility Organization | Lets you link a user to a department. By default, Facility Admin and Administrator hold it. |
| Can List Users in an Organizations | Lets you open the Users list of an organization or a responsibility. For an organization, hold it in the organization or in a parent organization. For a responsibility, hold it in the responsibility or in a responsibility that manages it. By default, Volunteer, Doctor, Nurse, Staff and Administrator hold it in an organization. In a responsibility, Admin and Manager hold it by default. |
| Can List Users in a Facility Organizations | Lets you open the Users list of a department. Hold it in any department of the facility. By default, Facility Admin, Administrator, Staff, Doctor and Nurse hold it. |

Note: If you reach a responsibility through a responsibility that manages it, Care does not show **Link User**. To link users there, you need a role in that responsibility that holds Can Manage Users in an Organization. By default, this is Admin.

## Steps

### 1. Open the Users list

The screen that you start from depends on where you link the user.

* For an organization, open your dashboard and select **Governance**. Select the card of the organization. Select the **Users** tab.
* For a responsibility, open your dashboard and select **Responsibilities**. Select the card of the responsibility. Care opens its Users list.
* For a department, open the facility and select **Settings**. Select **Departments**, and open the department. Select the **Users** tab.

Note: Care shows the row of tabs only when more than one tab is available to you.

![Step 1, Open the Users list: the Care screen, with the control for this step outlined](/assets/images/assign-role-to-user-1-1b363e4f85310845eac7d33b77fac7d8.webp)

### 2. Start the link

Select **Link User**. For an organization or a responsibility, Care opens the **Link User to Organization** form.

Note: The **Link User** button shows only if you have permission to manage users there.

![Step 2, Start the link: the Care screen, with the control for this step outlined](/assets/images/assign-role-to-user-2-bf9e2a683013b39aa70d2df93bee7870.webp)

### 3. Find the user

Open the user picker. It shows **Search for a user**.

For an organization or a responsibility, search by first name, last name or username. Care does not search by phone number.

Select the person from the results. Care shows the **Username** and the **Phone Number** of that person.

![Step 3, Find the user: the Care screen, with the control for this step outlined](/assets/images/assign-role-to-user-4-846e54c88fd6e905907d48586edd7255.webp)

### 4. Select the role

Select a role in **Select Role**. To filter the list, type in **Search Roles**.

The list shows only the roles for the place where you link the user. By default, it shows these roles:

* In an organization: Volunteer, Doctor, Nurse, Staff and Administrator.
* In a responsibility: Admin, Manager and Member.
* In a department: Volunteer, Doctor, Nurse, Staff, Pharmacist, Administrator and Facility Admin.

Note: Roles that your deployment adds for that place also show in the list.

Note: In an organization or a responsibility, you can give only a role with permissions that you also hold there. You cannot give a person more access than you have.

![Step 4, Select the role: the Care screen, with the control for this step outlined](/assets/images/assign-role-to-user-5-cc0b1ead61eb5cbe74804b4a7a6e9202.webp)

### 5. Link the user

For an organization or a responsibility, select **Link to Organization**.

For a department, select **Add to Organization**.

Note: **Link to Organization** stays disabled until you select a person and a role.

Note: In an organization or a responsibility, Care refuses the link if the user is already linked there, to a parent organization or to a child organization. Care shows "User association already exists", "User is already linked to a parent organization" or "User has association to some child organization".

![Step 5, Link the user: the Care screen, with the control for this step outlined](/assets/images/assign-role-to-user-7-27e84b6fc70ebc9c3b902fae17e1ccb1.webp)

## Expected Outcome

* For an organization or a responsibility, Care shows "User added to organization successfully".
* In an organization or a responsibility, the role column of the Users table shows the role that you selected.
* In a department, the card of the user shows the role that you selected.
* The user gets the permissions of that role in that organization, responsibility or department.

## Related

Concepts:

* [Roles and Permission](https://docs.ohc.network/concepts/access-governance/access-control.md)
* [Organisation](https://docs.ohc.network/concepts/access-governance/organization.md)
* [Responsibility](https://docs.ohc.network/concepts/access-governance/responsibility.md)
* [Facility Organization](https://docs.ohc.network/concepts/access-governance/facility-organization.md)
* [User](https://docs.ohc.network/concepts/access-governance/user.md)

Flows:

* [Change or remove a user's role](https://docs.ohc.network/flows/access-governance/access-control/change-or-remove-user-role.md)
* [Create a user](https://docs.ohc.network/flows/access-governance/user/create-user.md)
* [Search for a user](https://docs.ohc.network/flows/access-governance/user/search-for-user.md)
