---
title: "List fine-grained personal access tokens with access to organization resources"
method: GET
path: "/orgs/{org}/personal-access-tokens"
tags: ["orgs"]
---

# List fine-grained personal access tokens with access to organization resources

`GET /orgs/{org}/personal-access-tokens`

Lists approved fine-grained personal access tokens owned by organization members that can access organization resources.

Only GitHub Apps can use this endpoint.

## Path parameters

- `org` string, required

## Query parameters

- `per_page` integer
- `page` integer
- `sort` 'created_at'
- `direction` 'asc' | 'desc'
- `owner` string[]
- `repository` string
- `permission` string
- `last_used_before` string, date-time
- `last_used_after` string, date-time
- `token_id` string[]

## Response `200`

Response

- OrganizationProgrammaticAccessGrant[]
  - `id` integer, required — Unique identifier of the fine-grained personal access token grant. The `pat_id` used to get details about an approved fine-grained personal access token.
  - `owner` SimpleUser, required — A GitHub user.
    - `name` string, nullable
    - `email` string, nullable
    - `login` string, required
    - `id` integer, required
    - `node_id` string, required
    - `avatar_url` string, uri, required
    - `gravatar_id` string, nullable, required
    - `url` string, uri, required
    - `html_url` string, uri, required
    - `followers_url` string, uri, required
    - `following_url` string, required
    - `gists_url` string, required
    - `starred_url` string, required
    - `subscriptions_url` string, uri, required
    - `organizations_url` string, uri, required
    - `repos_url` string, uri, required
    - `events_url` string, required
    - `received_events_url` string, uri, required
    - `type` string, required
    - `site_admin` boolean, required
    - `starred_at` string
    - `user_view_type` string
  - `repository_selection` 'none' | 'all' | 'subset', required — Type of repository selection requested.
  - `repositories_url` string, required — URL to the list of repositories the fine-grained personal access token can access. Only follow when `repository_selection` is `subset`.
  - `permissions` object, required — Permissions requested, categorized by type of permission.
    - `organization` object
    - `repository` object
    - `other` object
  - `access_granted_at` string, required — Date and time when the fine-grained personal access token was approved to access the organization.
  - `token_id` integer, required — Unique identifier of the user's token. This field can also be found in audit log events and the organization's settings for their PAT grants.
  - `token_name` string, required — The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens.
  - `token_expired` boolean, required — Whether the associated fine-grained personal access token has expired.
  - `token_expires_at` string, nullable, required — Date and time when the associated fine-grained personal access token expires.
  - `token_last_used_at` string, nullable, required — Date and time when the associated fine-grained personal access token was last used for authentication.

## Other responses

- `403` — Forbidden
- `404` — Resource not found
- `422` — Validation failed, or the endpoint has been spammed.
- `500` — Internal Error

---

[API](https://skmtc.net/github/apis/github-v3-rest-api.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api/versions/a367f7028301/schema)
