# GitHub authentication

> Connect UiPath to GitHub using a custom OAuth 2.0 app in Automation Suite.

To authenticate, you must create your own OAuth 2.0 app in GitHub.

Follow the GitHub guidelines for creating your own app: [Registering your app](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authenticating-to-the-rest-api-with-an-oauth-app#registering-your-app). 

You can create your application [here](https://github.com/settings/applications/new). While setting up your own OAuth 2.0 app, make sure to provide the redirect/callback URL: `https://{yourDomain}/provisioning_/callback`.

## Required fields

| Field | Description |
| --- |  --- |
| Client ID | The Client ID assigned to your OAuth app during registration |
| Client secret | The Client secret generated on the registered OAuth app |
| Username | Used in GitHub login page. |
| Password | Used in GitHub login page. |
| Account type | Select the type of account for which you want to create the connection. Could be organization or personal |
| Username or Organization Name | If you're using a personal account, enter your GitHub username. If you're using an organization account, enter the organization's name |

## Retrieve your GitHub credentials

1. Log in to your GitHub account.
2. Select your profile image in the upper-right corner of the interface and select **Organizations**.
3. The list of organizations is available under **Organizations**. You can choose any of the organization names displayed and use the exact name in the authentication screen of the GitHub connector.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/integration-service/integration-service-docs-image-48831-0f9d6f7b.webp)

If you encounter any issues with choosing the correct organization (in case of multiple organizations), contact your IT department.

If you are not part of an organization, you can easily create one from your GitHub interface:

1. Log in to your GitHub account.
2. Select your profile image in the upper-right corner of the interface and select **Organizations**.
3. In the **Organizations** screen displayed, select **New organizations**.
4. Select your preferred plan and follow the on-screen instructions.

:::note
For more information on how to create an organization and the plans available, refer to the [GitHub support website](https://docs.github.com/en/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch).
:::

## Add the GitHub connection

To create a connection to your GitHub instance, you need to perform the following steps:

1. Select Orchestrator from the product launcher.
2. Select a folder, and then navigate to the **Connections** tab.
3. Select **Add connection**.
4. To open the connection creation page, select **GitHub** from the list. You can use the search bar to find the connector.
5. Enter the required credentials, select the account type (Organization or Personal), and select **Connect**.
   Where available, select the menu next to a field and choose **Use credential asset** or **Use Orchestrator asset** to reference an Orchestrator asset instead of entering the value directly. For more information, see [Use credential assets for connections](credential-store-connections.md).

:::important
There is a limit of ten tokens that are issued for a user-application-scope combination. For details, refer to [Authorizing OAuth Apps](https://docs.github.com/en/developers/apps/building-oauth-apps/authorizing-oauth-apps#creating-multiple-tokens-for-oauth-apps).
:::

For more information on authenticating with GitHub, refer to the [GitHub support website](https://docs.github.com/en/desktop/installing-and-configuring-github-desktop/installing-and-authenticating-to-github-desktop/authenticating-to-github).

## Permissions

The UiPath for GitHub connector asks for the following permissions:

* Full control of organization hooks
* Full control of repository hooks
* Read org and team membership, read org projects
* Full control of private repositories
* Update all user data
