---
title: vercel oidc-policies
description: List, inspect, create, update, and delete the OIDC policies that let workloads such as CI/CD jobs exchange their OIDC tokens for short-lived Vercel...
url: "https://vercel.com/docs/cli/oidc-policies"
last_updated: 2018-10-20
related:
  - /docs/oidc/policies
  - /docs/cli/login
  - /docs/cli
  - /docs/cli/oidc
  - /docs/monorepos/remote-caching
install_vercel_plugin: npx plugins add vercel/vercel-plugin
search_with_vercel_cli: npx vercel@latest docs search "<query>"
search_kb_with_vercel_cli: npx vercel@latest kb search "<query>"
---

# vercel oidc-policies

The `vercel oidc-policies` command manages your team's [OIDC policies](/docs/oidc/policies). An OIDC policy lets a workload, such as a GitHub Actions job, exchange the OpenID Connect (OIDC) token that its provider issues for a short-lived access token for a Vercel built-in app: Vercel CLI, Turborepo CLI, or Vercel Container Registry.

Sign in with [`vercel login`](/docs/cli/login), or [authenticate with a token](/docs/cli#using-in-a-ci/cd-environment). Managing OIDC policies requires a team member's credentials, so an access token from an OIDC exchange can't run this command. Commands use your current team. Pass the global `--scope` option to select another team.

## Usage

Run `vercel oidc-policies` without a subcommand to list policies:

```bash filename="terminal"
vercel oidc-policies
vercel oidc-policies list --app vercel-cli
```

*List OIDC policies for the current team, or only one app's policies.*

| Subcommand            | Description                                           |
| --------------------- | ----------------------------------------------------- |
| [`list`](#list)       | List OIDC policies. Alias: `ls`.                      |
| [`inspect`](#inspect) | Show an OIDC policy, including the permissions it grants. |
| [`create`](#create)   | Create an OIDC policy.                                |
| [`update`](#update)   | Change an OIDC policy.                                |
| [`delete`](#delete)   | Delete an OIDC policy. Aliases: `rm`, `del`.          |

`vercel oidc-policy` is an alias for `vercel oidc-policies`. Use a policy ID (it looks like `pol_…`) from `list` wherever a command takes `<oidc-policy>`. Every subcommand accepts `--json`.

## Apps

Each OIDC policy issues access tokens for one built-in app. Pass the app with `--app`. Each app takes different options to say what the policy allows:

| `--app`                     | What the policy allows                                                                                                                                       | Projects                                                                         |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
| `vercel-cli` (default)      | The Vercel CLI commands you pass with `--command`. The policy grants the permissions those commands need. See [command-based permissions](/docs/cli/oidc#understand-command-based-permissions). | `--project`, or all projects                                                     |
| `vercel-container-registry` | `--access read` to pull images (the default), or `--access read-write` to pull and push them.                                                                | `--project`, or all projects                                                     |
| `turborepo-cli`             | Reading from and writing to [Vercel Remote Cache](/docs/monorepos/remote-caching).                                                                           | None. Turborepo CLI policies apply to the whole team, so they take no `--project`. |

Passing an option that belongs to another app, such as `--access` for a Vercel CLI policy, fails before the CLI sends any request.

## Claims

Each policy trusts tokens from one issuer, and lists the claims that a token must present. Pass each claim with `--claim NAME=VALUE`. Values match exactly. Repeat `--claim` with the same name to allow more than one value:

```bash filename="terminal"
--claim aud=https://github.com/acme \
--claim repository=acme/web \
--claim ref=refs/heads/main --claim ref=refs/heads/release
```

*Match tokens from acme/web on the main or release branch.*

Every policy must match the `aud` (audience) claim, plus at least one claim that identifies the workload, such as `repository` for GitHub Actions. See [Match workloads to a policy](/docs/oidc/policies#match-workloads-to-a-policy).

For GitHub Actions, the issuer is `https://token.actions.githubusercontent.com`, and the default audience is the URL of the repository owner, such as `https://github.com/acme`. If your workflow requests a custom audience, use that value for `aud` instead.

## List

```bash filename="terminal"
vercel oidc-policies list
vercel oidc-policies list --app vercel-container-registry --json
```

*List all OIDC policies, or one app's policies as JSON.*

| Option   | Description                                                                         |
| -------- | ----------------------------------------------------------------------------------- |
| `--app`  | Only list policies for one app: `vercel-cli`, `turborepo-cli`, or `vercel-container-registry`. |
| `--json` | Write a JSON object with `oidcPolicies` to stdout.                                  |

The table summarizes what each policy allows, such as the number of commands, the number of projects, or the Vercel Container Registry access. When stdout isn't a terminal, the CLI writes tab-separated rows with a header row.

## Inspect

```bash filename="terminal"
vercel oidc-policies inspect pol_example
vercel oidc-policies inspect pol_example --json
```

*Show an OIDC policy using its ID.*

The output shows the policy's app, issuer, claims, projects, and **Permissions**: the permissions that access tokens from this policy receive. For a Vercel CLI policy, these are the permissions that the API derives from the policy's commands, which can allow more than the commands you selected. Text output shows the first five permissions. Pass `--json` to see all of them.

## Create

Pass an issuer, the claims to match, and what the policy allows:

```bash filename="terminal"
vercel oidc-policies create --name deploy-web \
  --issuer https://token.actions.githubusercontent.com \
  --claim aud=https://github.com/acme --claim repository=acme/web \
  --command deploy --command "env pull (production)" \
  --project web
```

*Let GitHub Actions workflows in acme/web deploy the web project with Vercel CLI.*

### Create options

| Option            | Required                  | Description                                                                                                         |
| ----------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `--app`           | No                        | `vercel-cli`, `turborepo-cli`, or `vercel-container-registry`. Defaults to `vercel-cli`.                            |
| `--issuer`        | Yes                       | The issuer URL of the OIDC tokens to trust. Must be an `https://` URL without a query string or fragment.           |
| `--claim`         | Yes                       | A claim the token must present, as `NAME=VALUE`. Repeatable. Must include `aud`. See [Claims](#claims).            |
| `--name`          | No                        | A name for the policy.                                                                                              |
| `--command`       | For `vercel-cli`          | A Vercel CLI command the policy allows, such as `deploy` or `"env pull (production)"`. Repeatable.                 |
| `--access`        | No                        | `vercel-container-registry` only. `read` or `read-write`. Defaults to `read`.                                       |
| `--project`, `-p` | No                        | Comma-separated project names or IDs. Defaults to all projects, current and future. Not for `turborepo-cli`.        |
| `--json`          | No                        | Return the created policy and an `outcome` of `created`.                                                            |

The command names match the commands in the dashboard's Vercel CLI policy form, and the API rejects names it doesn't recognize. After a successful create, the CLI prints the new policy ID to stdout, so you can capture it in a script:

```bash filename="terminal"
POLICY_ID=$(vercel oidc-policies create --app turborepo-cli \
  --issuer https://token.actions.githubusercontent.com \
  --claim aud=https://github.com/acme --claim repository=acme/monorepo)
```

*Create a Turborepo CLI policy and keep its ID.*

To let a workflow push images to Vercel Container Registry:

```bash filename="terminal"
vercel oidc-policies create --app vercel-container-registry --name push-images \
  --issuer https://token.actions.githubusercontent.com \
  --claim aud=https://github.com/acme --claim repository=acme/images \
  --access read-write --project images
```

*Grant read and write access to the images project's repositories.*

The confirmation that `create` prints leaves out the policy's claims, which can name private repositories, so it's safe to run in CI/CD logs. Run `inspect` to see the claims.

## Update

Pass a policy ID and at least one option to change. Each option replaces that part of the policy, and the parts you don't pass stay unchanged:

```bash filename="terminal"
vercel oidc-policies update pol_example \
  --claim aud=https://github.com/acme --claim repository=acme/web \
  --claim ref=refs/heads/main
```

*Replace the claims, so that only the main branch matches.*

### Update options

| Option            | Description                                                                                            |
| ----------------- | ------------------------------------------------------------------------------------------------------ |
| `--name`          | Rename the policy.                                                                                     |
| `--claim`         | Replace all of the claims. Repeatable. Must include `aud`.                                             |
| `--command`       | `vercel-cli` only. Replace all of the commands. Repeatable.                                            |
| `--access`        | `vercel-container-registry` only. `read` or `read-write`.                                              |
| `--project`, `-p` | Replace the projects with a comma-separated list of project names or IDs. Not for `turborepo-cli`.    |
| `--all-projects`  | Apply the policy to all projects, current and future. Can't be combined with `--project`. Not for `turborepo-cli`. |
| `--json`          | Return the updated policy and an `outcome` of `updated`.                                               |

You can't change a policy's app or issuer. Create a new policy instead.

## Delete

```bash filename="terminal"
vercel oidc-policies delete pol_example
```

*Delete an OIDC policy after confirming at the prompt.*

After you delete a policy, workloads that matched it can no longer exchange their OIDC tokens.

In a terminal, the CLI asks you to confirm. In a script, approve the deletion by passing the policy ID again with `--confirm-name`:

```bash filename="terminal"
vercel oidc-policies delete pol_example --confirm-name pol_example
```

*Delete an OIDC policy without a prompt.*

| Option           | Description                                                                         |
| ---------------- | ----------------------------------------------------------------------------------- |
| `--confirm-name` | Approve the deletion by passing the policy ID.                                      |
| `--json`         | Return the deleted policy and an `outcome` of `deleted`.                            |
| `--yes`, `-y`    | Deprecated. Use `--confirm-name` instead. AI agents can't approve a deletion with `--yes`. |

## Global Options

The following [global options](/docs/cli/global-options) can be passed when using the `vercel oidc-policies` command:

- [`--cwd`](/docs/cli/global-options#current-working-directory)
- [`--debug`](/docs/cli/global-options#debug)
- [`--global-config`](/docs/cli/global-options#global-config)
- [`--help`](/docs/cli/global-options#help)
- [`--local-config`](/docs/cli/global-options#local-config)
- [`--no-color`](/docs/cli/global-options#no-color)
- [`--non-interactive`](/docs/cli/global-options#non-interactive)
- [`--scope`](/docs/cli/global-options#scope)
- [`--token`](/docs/cli/global-options#token)
- [`--version`](/docs/cli/global-options#version)

For more information on global options and their usage, refer to the [options section](/docs/cli/global-options).

## More resources

- [OIDC Policies](/docs/oidc/policies)
- [Authenticate Vercel CLI from CI/CD with OIDC](/docs/cli/oidc)
- [Use Remote Caching from External CI/CD](/docs/monorepos/remote-caching/external-ci-cd#openid-connect-oidc)
- [Push Images from GitHub Actions](/docs/container-registry/github-actions)

## Search the docs from your terminal

Search the Vercel docs and read pages as Markdown with the Vercel CLI. No login required.

```bash
# Find docs pages by keyword
npx vercel@latest docs search "environment variables"
npx vercel@latest docs search "function timeout"

# Print a docs page as Markdown, by path or URL
npx vercel@latest docs inspect <page>
```

## Search guides from your terminal

Search the Knowledge Base and read guides as Markdown with the Vercel CLI. No login required.

```bash
# Find guides by keyword
npx vercel@latest kb search "rewrites and redirects"
npx vercel@latest kb search "AI SDK streaming"

# Show the latest guides
npx vercel@latest kb

# Print a guide as Markdown, by slug or URL
npx vercel@latest kb inspect <guide>
```

---

[View full sitemap](/docs/sitemap)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
