> ## 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.

# GH_PersonalAccessToken

> A fine-grained personal access token granted access to organization resources

<img noZoom src="https://mintcdn.com/specterops/tTIczgde9H07oLXf/assets/enterprise-AND-community-edition-pill-tag.svg?fit=max&auto=format&n=tTIczgde9H07oLXf&q=85&s=ad49a576589f4d2a8081df77d07fdf56" alt="Applies to BloodHound Enterprise and CE" width="482" height="45" data-path="assets/enterprise-AND-community-edition-pill-tag.svg" />

Represents a fine-grained personal access token that has been granted access to organization resources. PATs are linked to their owning user, the organization, and the repositories they can access. The permissions granted to the token are captured as a JSON string in the properties.

## Edges

<Note>
  The tables below list edges defined by the GitHub extension only. Additional edges to or from this node may be created by other extensions.
</Note>

### Inbound Edges

| Edge Type                                                                                  | Source Node Types                                                                                                                                                                                                | Traversable |
| ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| [GH\_Contains](/opengraph/extensions/github/edges/gh_contains)                             | [GH\_Organization](/opengraph/extensions/github/nodes/gh_organization), [GH\_Repository](/opengraph/extensions/github/nodes/gh_repository), [GH\_Environment](/opengraph/extensions/github/nodes/gh_environment) | ❌           |
| [GH\_HasPersonalAccessToken](/opengraph/extensions/github/edges/gh_haspersonalaccesstoken) | [GH\_User](/opengraph/extensions/github/nodes/gh_user)                                                                                                                                                           | ❌           |

### Outbound Edges

| Edge Type                                                        | Destination Node Types                                             | Traversable |
| ---------------------------------------------------------------- | ------------------------------------------------------------------ | ----------- |
| [GH\_CanAccess](/opengraph/extensions/github/edges/gh_canaccess) | [GH\_Repository](/opengraph/extensions/github/nodes/gh_repository) | ❌           |

## Properties

| Property Name         | Data Type | Description                                                                                        |
| --------------------- | --------- | -------------------------------------------------------------------------------------------------- |
| objectid              | string    | Deterministic Base64-encoded identifier, used as the unique graph identifier.                      |
| id                    | string    | The deterministic identifier (same as objectid).                                                   |
| name                  | string    | The user-assigned display name of the token.                                                       |
| environment\_name     | string    | The name of the environment (GitHub organization) where the token has access.                      |
| environmentid         | string    | The node\_id of the environment (GitHub organization).                                             |
| owner\_login          | string    | The login handle of the user who owns the token.                                                   |
| owner\_id             | integer   | The numeric GitHub ID of the token owner.                                                          |
| owner\_node\_id       | string    | The GraphQL node ID of the token owner.                                                            |
| token\_id             | integer   | Unique identifier of the user's token, found in audit logs and organization settings.              |
| token\_name           | string    | The user-assigned display name of the token.                                                       |
| token\_expired        | boolean   | Whether the token has expired.                                                                     |
| token\_expires\_at    | string    | ISO 8601 timestamp of when the token expires.                                                      |
| token\_last\_used\_at | string    | ISO 8601 timestamp of when the token was last used.                                                |
| repository\_selection | string    | Whether the token has access to `all`, `subset`, or `none` of the organization's repositories.     |
| access\_granted\_at   | string    | ISO 8601 timestamp of when access was granted to the organization.                                 |
| permissions           | string    | JSON string of the permissions granted to the token (e.g., `{"organization":{},"repository":{}}`). |

## Diagram

```mermaid theme={null}
flowchart TD
    GH_PersonalAccessToken[fa:fa-key GH_PersonalAccessToken]
    GH_User[fa:fa-user GH_User]
    GH_Organization[fa:fa-building GH_Organization]
    GH_Repository[fa:fa-box-archive GH_Repository]


    GH_User -.->|GH_HasPersonalAccessToken| GH_PersonalAccessToken
    GH_Organization -.->|GH_Contains| GH_PersonalAccessToken
    GH_PersonalAccessToken -.->|GH_CanAccess| GH_Repository
```
