Skip to content
AuthenticationDeploymentGitHub

GitHub Actions OIDC Token Request Fails: Check id-token Permission and Audience

Cloud deployment workflow cannot obtain an OIDC identity token. Confirm job has id-token: write permission and uses trusted trigger context. Grant least-privilege job permission and align cloud trust policy.

Quick Answer

Confirm job has id-token: write permission and uses trusted trigger context. Then inspect audience and subject claim policy expected by cloud provider. If that narrows the fault, grant least-privilege job permission and align cloud trust policy. Never replace OIDC with long-lived cloud administrator secrets

GitHub Actions OIDC Token Request Fails can interrupt a specific task: Cloud deployment workflow cannot obtain an OIDC identity token. This guide shows how to locate the actual failing component and choose a proportionate repair. It does not assume that one error message identifies a defective part or that reinstalling the whole platform is necessary.

Start here: Confirm job has id-token: write permission and uses trusted trigger context. A targeted comparison often provides better information than resetting every application, driver or service at once. Preserve your original settings so you can compare outcomes after each step.

Before you begin: preserve access and data

Safety boundary: Never replace OIDC with long-lived cloud administrator secrets. If this device or service is managed by an employer, hosting provider or school, follow its approved change procedure. Back up unique content first whenever the proposed repair would affect stored records, firmware, encryption or account access.

Write down the exact product and release, the action that fails and the first time it happened. A useful first comparison is: Inspect audience and subject claim policy expected by cloud provider. If possible, capture one passing case alongside the failure; those two results define what the fix must change.

Step-by-Step Troubleshooting

Begin with low-risk checks; continue to advanced diagnostics only if the evidence points to the affected component.

Reproduce the exact failure and preserve the context

Before changing settings, reproduce this specific symptom: Cloud deployment workflow cannot obtain an OIDC identity token. Record the exact dialog, code or event text, product model and software version. Note which action triggers it and whether you can repeat it. Confirm job has id-token: write permission and uses trusted trigger context. Keep a screenshot with private data redacted; it will establish whether a later correction changed the original failure, not just a related symptom.

Run the lowest-risk comparison test

Inspect audience and subject claim policy expected by cloud provider. Change only one variable between attempts: connection, user, input, application version, peripheral or storage target, whichever the check calls for. If the comparison succeeds, the difference is evidence about scope—not proof that every related system setting needs resetting. Record both results and the exact time of each test.

Apply the supported reversible correction

Grant least-privilege job permission and align cloud trust policy. Make the smallest documented change that addresses the observed failure. Keep the original setting or package version written down. If a restart is required, save active work first; avoid introducing multiple fixes at once because that makes a successful result impossible to attribute to a single cause.

Retest the original task and confirm stability

Cloud step exchanges OIDC token for short-lived credentials and deployment succeeds. Return to the same network, account, file or game where the problem first occurred. Repeat the same operation at least twice when practical, including one fresh launch or reconnect. If symptoms recur, restore the previous setting and move to the evidence-based checks below rather than applying unrelated tweaks.

Read the diagnostic results

Use the following evidence-to-action table instead of performing every possible repair. Each row suggests what the observed result actually establishes and which question to ask next.

Observation Evidence to collect Recommended decision
Failure is reproducible Confirm job has id-token: write permission and uses trusted trigger context Keep exact code, version and triggering action; do not infer an unrelated cause.
Comparison isolates a difference Inspect audience and subject claim policy expected by cloud provider Test only the component or setting that differs from the working case.
Advanced logs identify a subsystem Review reusable workflow inheritance and runner environment variables without printing JWT secrets Use the supported procedure for that subsystem and preserve a rollback.
After repair, original task succeeds Cloud step exchanges OIDC token for short-lived credentials and deployment succeeds Confirm persistence after reopening, reconnecting or restarting as appropriate.

Why the obvious fix may not work

A seemingly successful workaround is not necessarily the underlying correction. For this issue, first determine whether cloud deployment workflow cannot obtain an oidc identity token occurs on one account, one device, one connection or every attempt. The result of “Inspect audience and subject claim policy expected by cloud provider” determines how narrowly the next change should be applied.

If the first attempt fails again, record whether “Grant least-privilege job permission and align cloud trust policy” actually ran and whether the same error returned. If it did, move to this specific advanced path: Review reusable workflow inheritance and runner environment variables without printing JWT secrets. A new, different error after a change is useful information: it may mean the original blocking stage was passed, but another dependency now needs attention.

How to verify the repair worked

Pass condition: Cloud step exchanges OIDC token for short-lived credentials and deployment succeeds. Repeat the operation with the same input, account or connection that originally failed. For intermittent faults, complete several cycles and review new logs; a single green status icon without a successful real-world task is not sufficient evidence.

If the test fails: undo the last reversible change, retain the saved diagnostic output and escalate with the exact failure text and model/release information. In particular, never replace OIDC with long-lived cloud administrator secrets The next support contact should be able to reproduce your checks without guessing which settings were altered.

Solution Checklist

0/12 completed

Frequently asked questions

Is this definitely a hardware failure or a product-wide outage?

No. The symptom alone—Cloud deployment workflow cannot obtain an OIDC identity token—does not establish either cause. Start with “Confirm job has id-token: write permission and uses trusted trigger context” and determine whether the fault follows the account, connection, input, software version or physical component.

When should I stop troubleshooting myself?

Stop when the next action risks data loss, unapproved permissions or an unverified firmware or security change. For this case, the essential limit is: Never replace OIDC with long-lived cloud administrator secrets. Bring your notes and diagnostic evidence to qualified support instead of repeatedly resetting the device or service.

Further reading

Consult GitHub Docs for current version and model-specific procedures. This is a general authoritative documentation entry point, not necessarily a page that confirms the exact error string in this guide. Verify product-specific instructions before applying advanced changes.

Did this solution fix your problem?

Optional feedback helps us improve this guide. Never send private data.

PRBLEM / COMMUNITY

Discuss This Solution

Ask a question, compare results, or share a safe fix that worked for you.

Describe the exact issueInclude the error, device or software version, and what you already tried.
Protect your informationNever post passwords, recovery codes, private logs or personal data.
Retry if the discussion does not load

Disqus hosts the discussion. Comments load automatically as you approach this section and may use cookies.

Can't find your answer?

Tell our editors which problem needs a guide. Do not include passwords, API keys, email addresses, private URLs, or full error logs.

Analyze Error

Paste an error message to identify its likely category. Analysis takes place in your browser; only a short error category will be used if you choose to search.

Do not paste passwords, tokens, private URLs or full logs.