A PR workflow intended to use the read-only role fails with AccessDenied, but `main` works.
IntermediateTroubleshootingOIDC & Cloud Authentication
Answer
Likely causes → PR token sub is repo:ORG/REPO:pull_request; the trust allows only the ref form. Or the PR is from a fork where OIDC tokens are not issued with write.
Diagnose → Decode claims; check fork status.
Fix → Add a separate role trusting repo:ORG/REPO:pull_request with read-only permissions.
Prevent → Document the four sub forms in your platform guide.
More on OIDC & Cloud Authentication
`Error: Could not assume role with OIDC: Not authorized to perform sts:AssumeRoleWithWebIdentity`Advanced`Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers`Intermediate`Error: Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable`BeginnerOIDC works on `main` but fails on a tag-triggered release workflow.Intermediate`An error occurred (AccessDenied) when calling the AssumeRoleWithWebIdentity operation: Incorrect token audience`Intermediate`No OpenIDConnect provider found in your account for https://token.actions.githubusercontent.com`Beginner