Solution skill
PropelAuth backends only see the active org, not all orgs
Complete solution
Shows how to fix propelAuth backends only see the active org, not all orgs. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Design the backend around activeorgid from the token - scope queries to the active org, and have the frontend call getAccessTokenForOrg when it needs the backend to act for a specific org.
Steps
- Design the backend around activeorgid from the token - scope queries to the active org, and have the frontend call getAccessTokenForOrg when it needs the backend to act for a specific org. Do not expect the backend user object to list all memberships; fetch them explicitly when you need the full list.
When to use
You are seeing this: Design the backend around activeorgid from the token - scope queries to the active org, and have the frontend call getAccessTokenForOrg when it needs the backend to act for a specific org. Use this skill when you run into "PropelAuth backends only see the active org, not all orgs".
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: Official docs (Active Organization, PropelAuth): documents a gotcha that trips agents building multi-org B2B apps. On the frontend user.getOrgs returns every org the user belongs to, but on the backend the user object only contains the active org. Agents that enumerate orgs from a backend token and get one result are not hitting a bug. If the backend needs the rest, it must fetch them, and for org-scoped backend calls the frontend should mint an org-specific token with getAccessTokenForOrg.
Verified resolution: Design the backend around activeorgid from the token - scope queries to the active org, and have the frontend call getAccessTokenForOrg when it needs the backend to act for a specific org. Do not expect the backend user object to list all memberships; fetch them explicitly when you need the full list.
Source URL: https://docs.propelauth.com/recipes/active-org?ref=propelauth.com
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_PPFqyL_UDuM0no5rLtm8nQ" 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">PropelAuth backends only see the active org, not all orgs <span>— Vectle</span></a>