- Differences between classic and fine‑grained tokens
- How to create each type
- Repository and permission selection for fine‑grained tokens
- Organization approval workflow and administrative visibility
- Best practices for secure handling

Overview — Classic vs Fine‑grained tokens
Use this quick comparison to decide which token model fits your needs.
For more background on token types and recommended practices, see GitHub’s documentation on personal access tokens.
Classic personal access tokens (PATs)
Classic tokens are issued from a user account’s Developer settings and are configured with OAuth scopes such asrepo, workflow, or admin:org. Scopes apply broadly to any repository the user already has permission to access — you cannot limit a classic token to specific repositories.
To create a classic token, go to your user profile → Developer settings → Personal access tokens → Classic and choose the OAuth scopes you need.

Classic tokens grant permissions based on OAuth scopes (for example,
repo) that apply to all repositories the user can access. For least‑privilege access, prefer finer‑grained credentials where possible.Fine‑grained personal access tokens
Fine‑grained tokens give you precise control over the resource owner (user or organization), expiration, repository scope, and per-feature permissions such as Actions, Codespaces, Issues, and more. They are ideal when you need to limit access to a subset of repositories and specific actions. When creating a fine‑grained token you can:- Select the resource owner (your user account or an organization)
- Set an expiration date
- Limit access to specific repositories (single repo or multiple selected repos)
- Choose granular permissions per resource type (Read, Read & Write, etc.)

Selecting repositories and permissions
Fine‑grained tokens let you choose whether the token can access all repositories, only public repositories, or a defined list of repositories. After selecting repositories, specify per-feature permissions (for example, Actions: Read & Write; Codespaces: Read; Metadata: Read) to adhere to least‑privilege principles.
Organization approval workflow for fine‑grained tokens
Organizations can require administrator approval for fine‑grained tokens. When a user creates a fine‑grained token that targets an organization where approvals are enforced, the token is created in a pending state and remains inactive until an organization admin approves it. Even while pending, GitHub displays the token value to the user immediately after generation — copy it securely right away.
- Requesting user
- Requested repositories and per-feature permissions
- User-supplied reason for the request

Settings and token visibility for organization admins
Organization admins can configure whether fine‑grained tokens require approval (this is enabled by default in many setups). Admins can also view Active tokens to track:- Which tokens exist for the organization
- Token owners (who created them)
- Expiration dates and last-used timestamps

Always copy token values immediately after generation and store them in a secure secrets manager. GitHub will not display the token again after you navigate away. Revoke tokens that are no longer needed and prefer fine‑grained tokens to enforce least‑privilege access.
Practical recommendations
- Prefer fine‑grained tokens for new integrations to limit scope to specific repositories and permissions.
- Use short expirations and rotate tokens regularly.
- Store tokens in a secrets manager (Vault, AWS Secrets Manager, GitHub Secrets, etc.).
- Monitor Active tokens and Pending requests periodically to detect unnecessary or risky access.
Links and references
- GitHub: About fine‑grained personal access tokens
- GitHub: Creating a personal access token
- GitHub Docs: Managing access for organizations