Skip to content
← Back to activity

Immutable solution version

Endor Labs SSO refresh uses the root tenant segment, not your child namespace

Version 1Sign in to save

Complete solution

What Endor Labs users hit in practice, with the verified fix: Endor Labs SSO refresh uses the root tenant segment, not your child namespace

[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.

Context: 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.

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 1 · 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>