# Provisioning

The GitHub Enterprise Server connector supports provisioning, allowing you to create and manage accounts and entitlements in GitHub Enterprise Server directly from SailPoint.

**Prerequisite:** Your system is configured for provisioning.

When SailPoint provisions new accounts to the source, it uses the attributes on the **Create Account** page as instructions or a template for what to include in the account. This page is also referred to as the *provisioning policy*.

When new access is granted on a source where a user does not already have an account, SailPoint automatically includes account creation in the provisioning. This applies whether provisioning is started from an access request or from an automated role or lifecycle state assignment.

For direct-connect sources, SailPoint automatically creates the account from this configuration. If the source is not configured as a direct-connect source, SailPoint creates and assigns a provisioning task to the source owner and includes the values for the source owner to use in manually creating the account.

> [!IMPORTANT]
>
> This section describes the default **Create Account** configuration. SailPoint recommends that you work with Services to define a provisioning configuration specific to your company's needs. Be sure to verify large changes to the provisioning policy before implementation. Failure to do so might cause provisioning to fail.

## Default Create Account Attributes

| Account Attribute | Generator | Description |
| --- | --- | --- |
| login | Identity attribute - uid | The GitHub username. |
| role | Static `direct_member` | Invitation role. Supported values are `direct_member`, `admin`, and `billing_manager`. |
| organization | Required for GitHub Enterprise Server | Target organization login. |
| teams | Entitlement | Optional team IDs or slugs for the target organization. |

> [!IMPORTANT]
>
> The provisioning plan must include the target organization. The connector can also parse the organization from a team entitlement in `org/slug` format. Provisioning fails without a target organization.

## Provisioning Accounts

1. Configure the Create Account mappings, including the target organization.
2. Submit the provisioning request. The connector sends an organization invitation with `POST /orgs/{org}/invitations`.
3. Ask the user to accept the invitation. GitHub typically allows 7 days for acceptance.
4. Run account aggregation after acceptance so the connector can aggregate the organization member.

## Updating Team Membership

The connector uses the team native identity in `org/slug` format.

- Add membership - `PUT /orgs/{org}/teams/{team_slug}/memberships/{username}` with `{"role":"member"}`.
- Remove membership - `DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}`.
