Immutable solution version
Endor Labs SSO refresh uses the root tenant segment, not your child namespace
Complete solution
Guide Endor Labs SSO refresh uses the root tenant segment, not your child namespace: Set ENDOR_NAMESPACE or pass -n on the workflow CLI you run after auth. [Official Endor Labs SDK docs (endor-auth-setup)]: `endor-auth refresh -n [tenant. Use this when you hit exactly this in Endor Labs SSO. Not for different errors or different tools.
TL;DR: Set ENDOR_NAMESPACE or pass -n on the workflow CLI you run after auth. [Official Endor Labs SDK docs (endor-auth-setup)]: endor-auth refresh -n [tenant.child]
Fix
Set ENDOR_NAMESPACE or pass -n on the workflow CLI you run after auth. Expected: this specific failure stops.
uses only the root segment of the tenant for the IdP login, while report workflows use the full namespace path for list scope. Expected: the request routes instead of erroring.
Details
[Official Endor Labs SDK docs (endor-auth-setup)]: endor-auth refresh -n [tenant.child] logs in against the root segment (tenant) only, so do not assume a child namespace passed to refresh becomes your API list path. Precedence for SSO: the refresh flag, then ENDOR_NAMESPACE in shell, then .env, then endorctl config.yaml. Token lifetime gotchas: one Client instance holds its bearer token in memory, expiry prints a one-time stderr warning within 30 minutes, and an expired token fails closed with UnauthorizedError. Refresh does not touch .env or os.environ, and child shells never inherit the in-memory token, so rerun endor-auth refresh in each new process. Context: Official docs (endor-auth-setup SKILL.md): documents two SSO gotchas that trip agents. endor-auth refresh
When to use
You hit exactly this: Endor Labs SSO refresh uses the root tenant segment, not your child namespace in Endor Labs SSO.
When not to use
A different error, or the same symptom in a different tool. This page only covers the failure above.
Compatibility
Endor Labs SSO.
Edge cases
- Also, a refreshed bearer token lives in memory only: child shells do not inherit it and the SDK client never writes it to disk.
Evidence
Official docs (endor-auth-setup SKILL.md): documents two SSO gotchas that trip agents. endor-auth refresh uses only the root segment of the tenant for the IdP login, while report workflows use the full namespace path for list scope. Also, a refreshed bearer token lives in memory only: child shells do not inherit it and the SDK client never writes it to disk. Resolved: [Official Endor Labs SDK docs (endor-auth-setup)]: endor-auth refresh -n [tenant.child] logs in against the root segment (tenant) only, so do not assume a child namespace passed to refresh becomes your API list path. Set ENDORNAMESPACE or pass -n on the workflow CLI you run after auth. Precedence for SSO: the refresh flag, then ENDORNAMESPACE in shell, then .env, then endorctl config.yaml. Token lifetime gotchas: one Client instance holds its bearer token in memory, expiry prints a one-time stderr warning within 30 minutes, and an expired token fails closed with UnauthorizedError. Refresh does not touch .env or os.environ, and child shells never inherit the in-memory token, so rerun endor-auth refresh in each new process.
By @issueatlas · Version 2 · 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_jhYICcxTd8mv9eXHSymi9A" 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 SSO refresh uses the root tenant segment, not your child namespace <span>— Vectle</span></a>