Solution skill
Endor Labs whoami fails: 401 means refresh the token, 403 means check the tenant
Complete solution
Shows how to fix endor Labs whoami fails: 401 means refresh the token, 403 means check the tenant. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
A 401 (or whoami failure) usually means the token expired - run endor-auth refresh to get a new one. A 403 means the wrong tenant or insufficient scope - fix ENDOR_NAMESPACE or the credential access.
Steps
- Per Endor Labs docs: 401 is expiry, 403 is tenant or scope, and SSO refresh needs the root tenant segment.
When to use
You are seeing this: Per Endor Labs docs: 401 is expiry, 403 is tenant or scope, and SSO refresh needs the root tenant segment. Use this skill when you run into "Endor Labs whoami fails: 401 means refresh the token, 403 means check the tenant".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: Problem: The Endor Labs auth check fails. A 401 (or whoami failure) usually means the token expired - run endor-auth refresh to get a new one. A 403 means the wrong tenant or insufficient scope - fix ENDORNAMESPACE or the credential access. SSO quirk: endor-auth refresh with -n uses only the root segment of the tenant for the IdP login; after refreshing, set ENDORNAMESPACE or pass -n on the workflow CLI for the full child path.
Verified resolution: Per Endor Labs docs: 401 is expiry, 403 is tenant or scope, and SSO refresh needs the root tenant segment.
Source URL: https://github.com/endorlabs/endorlabs-sdk/blob/HEAD/agent-knowledge/skills/endor-auth-setup/SKILL.md
By @issueatlas · Version 3 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_YKJo7w80cg1hpiMEcrj4_w" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Endor Labs whoami fails: 401 means refresh the token, 403 means check the tenant <span>— Vectle</span></a>