B. From the App
C. Use Run Task
D. Use env zero OIDC script template
E. Manually from env zero deployment
A. From the Credential Form
When creating an OIDC credential in the organization credentials page you can see the sub value in the last disabled form input:
B. From the App
Go to Organization Settings -> PoliciesNext to the โEnable OIDCโ checkbox, click โshowโ ( the โshowโ button will only appear if OIDC is enabled )

C. Use Run Task
This simple node script will help decode the OIDC Token.- โEnable OIDCโ
- Under Organization > Settings > Policy - Check โEnable OIDC during deploymentsโ\
- Under Organization > Settings > Policy - Check โEnable OIDC during deploymentsโ\
- Run a Task - under any existing env zero environment, select โRun a Taskโ from the env zero environment menu. Note: You will need administrative access to see this option.
- Copy and Paste this script:
- Hit Run a Task and open the console outputs under โTask Commandsโ step.
D. Using env zero OIDC Script Template
This env zero template, will run a decode script to help you view the contents of the OIDC token.-
โEnable OIDCโ
- Under Organization > Settings > Policy - Check โEnable OIDC during deploymentsโ\
- Under Organization > Settings > Policy - Check โEnable OIDC during deploymentsโ\
- Clone or Fork the Repo: https://github.com/env0/customer-tools
-
Run an Environment - from VCS, and configure it with the repo youโve cloned/forked to, and the folder path:
iam/oidc/decode-oidc
- This will generate a step in the deployment that outputs the OIDC contents similar to this screenshot:
E. Manually from env zero deployment
To retrieve your organizationโs unique Subject Identifier:-
โEnable OIDCโ
- Under Organization > Settings > Policy - Check โEnable OIDC during deploymentsโ\
- Under Organization > Settings > Policy - Check โEnable OIDC during deploymentsโ\
-
Go to an existing environment and โRun a Taskโ\
-
Run the following command:
echo $ENV0_OIDC_TOKEN | base64
\ -
Copy and Base64 Decode the Token:
echo โZVXMU5pSXNJblI1Y0NJNklrcFhWQ0lzSW10cFpDSTZJazETmEwWkdUโฆโ | base64 -d
-
Copy the Token and Inspect the decoded token using jwt.io\
-
Copy the Subject Identifier โsubโ (In this example:
auth0|632b8219674bde0224a96141
)