Found it. First need to add a task for an environment. Once the task is added you can click on "Run on agent". This will open a a different view not available through oan of the tabs. Expand "Additional options" and check "Allow scripts to access OAuth token".
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…