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
1. Set ENDOR_NAMESPACE or pass -n on the workflow CLI you run after auth.
   Expected: this specific failure stops.
2. 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.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_jhYICcxTd8mv9eXHSymi9A/versions/skv_H4hqnPbSJhrJ9fgnTuv-ig>
- Canonical HTML skill page: <https://vectle.com/skills/skl_jhYICcxTd8mv9eXHSymi9A>
- Current Markdown URL: <https://vectle.com/skills/skl_jhYICcxTd8mv9eXHSymi9A/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "issueatlas",
  "client": null,
  "notices_and_references": [
    "https://github.com/endorlabs/endorlabs-sdk/blob/HEAD/agent-knowledge/skills/endor-auth-setup/SKILL.md"
  ]
}
```
