# How to switch organization using getAccessTokenSilently

**URL:** <https://community.auth0.com/t/how-to-switch-organization-using-getaccesstokensilently/184426>\
**Category:** Get Help\
**Tags:** sdks-quickstarts, auth0-react\
**Created:** [March 25, 2025, 4:38pm UTC](https://community.auth0.com/t/how-to-switch-organization-using-getaccesstokensilently/184426 "2025-03-25T16:38:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![renan.padilha](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/renan.padilha/32/71378_2.png) [@renan.padilha](https://community.auth0.com/u/renan.padilha)\
**Post date:** [March 25, 2025, 4:38pm UTC](https://community.auth0.com/t/how-to-switch-organization-using-getaccesstokensilently/184426/1 "2025-03-25T16:38:07Z")

</div>

Hello!

We have a front-end usign React 19 and Auth0’s React SDK

I have an use case that we need switch organization clicking in a button that list organizations from an user (API Management).

Actually the last answer of this issue at github: issues/1055  
is “we not support new token with new org using getAccessTokenSilently”, but it is from 2023.

In 2025 we have some solution to switch organizations using this method?

I could change organization with loginWithPopup, but not with silently method.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [March 25, 2025, 5:02pm UTC](https://community.auth0.com/t/how-to-switch-organization-using-getaccesstokensilently/184426/3 "2025-03-25T17:02:16Z")

</div>

Hi @renan.padilha,

Welcome to the Auth0 Community!

Yes, your findings are correct. We currently do not support retrieving a new access token with a new org when using the `getAccessTokenSilently()` method.

If this is needed, you could try logging the the user against the other organization with either the `loginWithRedirect` or `loginWithPopup` methods and specifying the `organization` as a query parameter.

Let me know if you have any issues with this.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![TRF-Jabel](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/trf-jabel/32/73842_2.png) [@TRF-Jabel](https://community.auth0.com/u/TRF-Jabel)\
**Post date:** [March 26, 2025, 3:35am UTC](https://community.auth0.com/t/how-to-switch-organization-using-getaccesstokensilently/184426/4 "2025-03-26T03:35:11Z")

</div>

I’m sure many people in the community, myself included, would appreciate an official implementation example of this or a blog post explaining the recommended way of switching from one logged in organization to another

EDIT: [This](https://community.auth0.com/t/a-solutions-engineers-guide-to-building-a-b2b-saas-app/131150) is where my digging in led me to. However there doesn’t seem to be a way to allow a logged in application to switch without having a popup or a redirect

---

<div class="post-metadata">

**Author:** ![renan.padilha](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/renan.padilha/32/71378_2.png) [@renan.padilha](https://community.auth0.com/u/renan.padilha)\
**Post date:** [March 26, 2025, 1:01pm UTC](https://community.auth0.com/t/how-to-switch-organization-using-getaccesstokensilently/184426/5 "2025-03-26T13:01:57Z")

</div>

There is a way to inject orgs in token using actions triggers post-login? We have a front-end application (SPA) and we need switch organizations, but i cannot figure out how to get organizations without access API Management, but SPAs cannot access API Management.

Do you have some solution to get organizations dynamically?

The flow is: user do login, list orgs (how to do without api management?), click and `loginWithPopup`, change org.

I cannot found a way to get organizations from user.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 9, 2025, 1:02pm UTC](https://community.auth0.com/t/how-to-switch-organization-using-getaccesstokensilently/184426/6 "2025-04-09T13:02:19Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
