# User Management

## Organization Member Status

Copia makes a distinction between "Primary" and "Non-primary" organization members. Copia also enables organization administrators to control access to Copia for their Primary Organization members via deprovisioning and reprovisioning.

### Primary Organization Members

Every Copia user has one Primary Organization. Users become Primary Organization members when they are created by an organization (via email invitation or Directory Sync). Primary membership in an organization means the following:

1. Primary Organization members use the SSO portal associated with their primary organization.
2. SSO requirements for a user are determined by their Primary Organization's settings.
3. Administrators of an organization can deprovision and reprovision Primary members.

If a user needs to be assigned to a different Primary Organization, reach out to customer support.

### Non-Primary Organization Members

Non-Primary members are any organization members that are not Primary members - they are Primary members of another organization.

These members are not subject to your organization's SSO requirements, so you should more carefully audit them. To make this easier, non-Primary membership is highlighted in team and organization UIs, and non-Primary members are always displayed above Primary members in the members section.

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2F0uiy9WUCHRqou93t0Y5f%2FScreenshot%202023-07-13%20at%207.11.06%20PM.png?alt=media&#x26;token=6365631f-2197-4e49-b164-c7a2e732cf5a" alt=""><figcaption><p>Non-primary member shown in the </p></figcaption></figure>

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FmiYU7sIumu00mag5GXDz%2FScreenshot%202023-07-13%20at%207.09.45%20PM.png?alt=media&#x26;token=855c5498-713d-45eb-96ec-601e34c434c2" alt=""><figcaption><p>Non-primary member highlighted within team</p></figcaption></figure>

### Deprovisioned Members

Organization administrators can "deprovision" Primary members, which prevents them from logging into Copia. As such, deprovisioned members **do not** count towards your seat limit.&#x20;

{% hint style="info" %}
Deprovisioned members cannot log in to Copia, but deprovisioning a member does not delete their account - it is both **non-destructive** and **reversible.**&#x20;
{% endhint %}

**Non-destructive** means the work (commits, PRs, etc.) of deprovisioned users isn't lost, nor are deprovisioned users removed from teams. **Reversible** means members can be reprovisioned.

#### Deprovisioning and Reprovisioning Members

{% hint style="info" %}
The following methods allow Organization administrators to manually deprovision / reprovision members. Copia recommends setting up [Directory Sync](https://docs.copia.io/docs/git-based-source-control/administration/external-id-mgmt#directory-sync) to enable automatic deprovisioning / reprovisioning of members based on Identity Provider events.
{% endhint %}

Organization administrators can deprovision and reprovision primary members from the members section:

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FJOT3QPPYaLbhEv55iFEp%2FScreenshot%202023-07-13%20at%207.32.45%20PM.png?alt=media&#x26;token=691e74c2-be9d-4a23-9c77-2c0df8f9585f" alt=""><figcaption><p>Deprovision option in the "Members"  of the </p></figcaption></figure>

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FuGzyNGDgp1KUktwRSxX8%2FScreenshot%202023-07-13%20at%207.16.51%20PM.png?alt=media&#x26;token=eb3aecd8-92d7-4c6c-a514-91ffba65afbd" alt=""><figcaption><p>Reprovision option in the "Deprovisioned Users" pane of the </p></figcaption></figure>

Organization administrators can also deprovision or reprovision primary members from the "Administrative Actions..." dropdown on the user's profile page:

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FJjCzJHboJ8a56j1LbPHx%2FScreenshot%202023-07-13%20at%207.36.03%20PM.png?alt=media&#x26;token=1f5015b9-0bf7-4682-a13d-8f78a6b24abb" alt=""><figcaption><p>Option to deprovision a user</p></figcaption></figure>

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FGwwiITcOAXm3VsbSwUzw%2Fimage.png?alt=media&#x26;token=a729a929-6793-4707-b591-05dc57e621f0" alt=""><figcaption><p>Confirmation dialog for reprovisioning a user from the Administrative Actions dialog</p></figcaption></figure>

## Adding and Removing Users

{% hint style="warning" %}
If using [Team Mapping](https://docs.copia.io/docs/git-based-source-control/administration/external-id-mgmt#group-team-mapping), your organization membership will be controlled exclusively via your Identity Provider, and you will not have the option to add or remove users in Copia.
{% endhint %}

### Adding New Users to Your Organization <a href="#invite-new-members-to-your-organization" id="invite-new-members-to-your-organization"></a>

To add a new user to Copia, you'll need to invite them to a specific team within the organization. First, navigate to the "Members" section of the home page.

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FGAdmIV0kOijCbRpr7854%2FScreenshot%202023-07-13%20at%206.24.05%20PM.png?alt=media&#x26;token=639b29fd-6bca-4b8f-b882-094cbe054a2c" alt=""><figcaption></figcaption></figure>

Once in the *Members* view, click on the *Invite New Member* button. This option will only be available to users who are part of the Owners team.

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FI6uCne555pcle3ney5zf%2FScreenshot%202023-07-13%20at%206.27.20%20PM.png?alt=media&#x26;token=d29229e0-5f35-4f86-9d2e-a347ff8e90d1" alt=""><figcaption></figcaption></figure>

Enter the user's email address, Initial Team, and (if not using [Single-Role teams](https://docs.copia.io/docs/git-based-source-control/org-settings#single-role-teams)) team privileges for the new individual. Click *Send Invitation* to continue.

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FEKI4JmT7c16QLaMr1htb%2FScreenshot%202023-07-13%20at%206.29.25%20PM.png?alt=media&#x26;token=7ad92e68-e05f-44e4-b033-19727216bb47" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Copia recommends that you do not invite new users directly to the Owners team until after verifying they have joined your organization, as the Owners team has access to dangerous operations (like deleting the entire Organization).
{% endhint %}

An invitation email will automatically be sent to the invitee. Their account will appear in the Members tab in a pending state until they complete registration. If you'd prefer to cancel the invitation, simply click the *Cancel Invitation* button. Whenever they complete registration, the new Member will be added to your Organization and their account will move from the *Pending Users* tab to the *All Users* tab.

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FpzOTgmBq6jPYd6CZbn0Z%2Fimage.png?alt=media&#x26;token=6e754bd6-be8d-49ae-a076-1f57eee90940" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
There is one other mechanism aside from email invitations for adding new Members to your Organization - Directory Sync (SCIM). See[ the instructions](https://docs.copia.io/docs/git-based-source-control/administration/external-id-mgmt#directory-sync) for more details.
{% endhint %}

### Removing Users From Your Organization

If you set up [Directory Sync (SCIM)](https://docs.copia.io/docs/git-based-source-control/administration/external-id-mgmt#functionality), users lose access to your organization automatically when you remove them in the Identity Provider.

If you have not set up Directory Sync and you need to remove a user's access to your organization (for example, if the employee leaves your company), you should remove the user's access manually.

{% hint style="info" %}
If you remove a Member's access to an Organization, their work will not be deleted. Everyone who has viewing privileges on the repository they worked on can still see it. So if only one Team of many in your Organization has access to a specific repository, everyone on that Team will still be able to see the removed user’s work on that repository, but users in a separate Team will not. This is the same behavior regardless of whether a user has been removed or not.
{% endhint %}

#### Primary organization members

To remove a Primary member's access to Copia, you should [deprovision them as described above](#deprovisioning-and-reprovisioning-members).

{% hint style="info" %}
All Copia users (even deprovisioned ones) have a primary organization, which is why you cannot remove primary members from your organization.
{% endhint %}

#### Non-Primary Organization members

Organization admins cannot deprovision non-Primary members of their organization, since the lifecycle of those users is controlled by their Primary organization. Instead, you should remove them from the organization:

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FKGybNYaEphhMhJhbKDnu%2FEOL_1.png?alt=media&#x26;token=2123ea4f-2b63-4c6d-bf56-9397c6e60aeb" alt=""><figcaption></figcaption></figure>

Find the user in the list, and click *Remove from Org.*

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FOeqefFuIDG5XX7qyJUQW%2FEOL_2.png?alt=media&#x26;token=d211e8e5-a0d8-49e2-83e8-d2eb1dcf640c" alt=""><figcaption></figcaption></figure>
