> ## Documentation Index
> Fetch the complete documentation index at: https://bloodhound.specterops.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure a Personal Access Token

> Create a Fine-grained Personal Access Token for GitHub data collection.

![Applies to BloodHound Enterprise and CE](https://mintcdn.com/specterops/tTIczgde9H07oLXf/assets/enterprise-AND-community-edition-pill-tag.svg?fit=max\&auto=format\&n=tTIczgde9H07oLXf\&q=85\&s=ad49a576589f4d2a8081df77d07fdf56)

This page covers creating a Fine-grained Personal Access Token (PAT) for GitHub. PATs have a rate limit of **5,000 API requests per hour**.

> [!TIP]
>
> For higher rate limits, see [Configure a GitHub App Installation](https://bloodhound.specterops.io/openhound/collectors/github/configure-app.md).

## Create a Fine-grained Personal Access Token

**1. Navigate to Personal Access Tokens**

Navigate to your GitHub **Profile** > **Settings**.

![GitHub profile settings menu](https://mintcdn.com/specterops/vLZ2lUIRm_HibFmq/images/extensions/github/pat/1_proile_settings.png?fit=max\&auto=format\&n=vLZ2lUIRm_HibFmq\&q=85\&s=ab9439412f0ba55bce2039b0029b8b4d)

**2. Open Developer Settings**

Go to **Developer settings** (bottom left).

![Developer settings in GitHub profile](https://mintcdn.com/specterops/vLZ2lUIRm_HibFmq/images/extensions/github/pat/2_developer_settings.png?fit=max\&auto=format\&n=vLZ2lUIRm_HibFmq\&q=85\&s=c7b4a1d4bae777f11f8cd01292603ca9)

**3. Go to Fine-grained Tokens**

Navigate to **Personal access tokens** > **Fine-grained tokens**.

![Fine-grained tokens in Developer settings](https://mintcdn.com/specterops/vLZ2lUIRm_HibFmq/images/extensions/github/pat/3_fine-grained_tokens.png?fit=max\&auto=format\&n=vLZ2lUIRm_HibFmq\&q=85\&s=8f3ea1a0aae68d997dd55edad87ac3e1)

**4. Generate a new token**

Click **Generate new token**.

![Generate new fine-grained token page](https://mintcdn.com/specterops/vLZ2lUIRm_HibFmq/images/extensions/github/pat/4_generate_token.png?fit=max\&auto=format\&n=vLZ2lUIRm_HibFmq\&q=85\&s=c27fefc694ca59a43e0aaa0355127db5)

**5. Set resource owner**

Set the **Resource owner** to your target organization.

**6. Configure the access scope**

Under **Repository access**, select **All repositories**.

![Select All repositories for token access](https://mintcdn.com/specterops/vLZ2lUIRm_HibFmq/images/extensions/github/pat/5_all_repositories.png?fit=max\&auto=format\&n=vLZ2lUIRm_HibFmq\&q=85\&s=5dee75ead33a6326953b12ebb3a1d760)

**7. Configure the repository and org permissions**

Set the following permissions to **Read-only**:

**required permissions**

**Repository permissions**

* Actions
* Administration
* Contents
* Environments
* Metadata
* Secret scanning alerts
* Secrets
* Variables

**Organization permissions**

* Administration
* Custom organization roles
* Custom repository roles
* Members
* Personal access tokens
* Personal access token requests
* Secrets
* Self-hosted runners
* Variables

**8. Generate the token**

> [!WARNING]
>
> You must save the token value (preferably in a password manager) at this point. You will not be able to recover it later.

Click **Generate token** and copy the token value.

![Copy the generated token](https://mintcdn.com/specterops/vLZ2lUIRm_HibFmq/images/extensions/github/pat/7_save_pat.png?fit=max\&auto=format\&n=vLZ2lUIRm_HibFmq\&q=85\&s=d0e41c0ff67b027b55c7753214051a03)

> [!TIP]
>
> For organizations with SAML SSO enabled, you must [authorize the PAT for SSO access](https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on) after creating it.

## Next Steps

After creating a token, proceed to [configure the collector](https://bloodhound.specterops.io/openhound/collectors/github/collect-data.md) to start collection.
