# Is it possible to change tenants at runtime based on the environment I have selected from a environment picker?

**URL:** <https://community.auth0.com/t/is-it-possible-to-change-tenants-at-runtime-based-on-the-environment-i-have-selected-from-a-environment-picker/133972>\
**Category:** Get Help\
**Tags:** login-experience, new-universal-login-experience\
**Created:** [May 13, 2024, 9:37am UTC](https://community.auth0.com/t/is-it-possible-to-change-tenants-at-runtime-based-on-the-environment-i-have-selected-from-a-environment-picker/133972 "2024-05-13T09:37:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BSK](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bsk/32/49977_2.png) [@BSK](https://community.auth0.com/u/BSK)\
**Post date:** [May 13, 2024, 9:37am UTC](https://community.auth0.com/t/is-it-possible-to-change-tenants-at-runtime-based-on-the-environment-i-have-selected-from-a-environment-picker/133972/1 "2024-05-13T09:37:22Z")

</div>

I have a mobile React Native android application with an environment picker in the dev menu which allows me to change environments to dev, sit, uat and prod. We also want to have a separate tenant for each of these environments. I was wondering if it is possible to change tenants at runtime based on the environment I have selected from a environment picker?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [May 14, 2024, 12:23am UTC](https://community.auth0.com/t/is-it-possible-to-change-tenants-at-runtime-based-on-the-environment-i-have-selected-from-a-environment-picker/133972/3 "2024-05-14T00:23:13Z")

</div>

Hey there @BSK !

While not officially supported OOB, the following discussion may be helpful:

> <https://github.com/auth0/react-native-auth0/issues/282>
>
> \### Description
> This is more of a question than a bug/feature request. However,… I would consider this an issue related to this library. 
> 
> As described in the Readme you have to specify the auth0 tenant domain in the \`AndroidManifest.xml\` like:
> 
> \`\`\`
> \<intent-filter\>
> \<action android:name="android.intent.action.VIEW" /\>
> \<category android:name="android.intent.category.DEFAULT" /\>
> \<category android:name="android.intent.category.BROWSABLE" /\>
> \<data
> android:host="YOUR\_AUTH0\_DOMAIN"
> android:pathPrefix="/android/${applicationId}/callback"
> android:scheme="${applicationId}" /\>
> \</intent-filter\>
> \`\`\`
> 
> We are building a multi-tenant mobile app. Since each of our tenants have a different URL we need a way to dynamically change the value of \`YOUR\_AUTH0\_DOMAIN\`. According to the \[Android documentation\](https://developer.android.com/guide/topics/manifest/data-element) it is possible to use wildcards inside \`android:host\` such as \`\*.mydomain.com\`. I did't try this yet but it should work if all my tenants would use different subdomains under the same top-level-domain. This might be an ok solution for production environments but that would also mean that I have to pay for every other environment (dev and staging) to use the custom domain feature on auth0.
> 
> So my question is, if it is possible to build a multi tenant app on Android with this package?
> 
> 
> \### Prerequisites
> 
> \- \[x\] Did you check the documentation? \[Add a link\]
> \- \[x\] Did you check the \[Auth0 Community\](https://community.auth0.com/)?
> \- \[x\] Are you reporting this to the correct repository?
> \- \[\] Are there any related or duplicate Issues or PRs for this issue?
> 
> \### Environment
> 
> Please provide the following:
> 
> \- React Native Auth0 version
> 2.1.1
> \- React Native version
> 0.60.5

---

<div class="post-metadata">

**Author:** ![BSK](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bsk/32/49977_2.png) [@BSK](https://community.auth0.com/u/BSK)\
**Post date:** [May 14, 2024, 10:45am UTC](https://community.auth0.com/t/is-it-possible-to-change-tenants-at-runtime-based-on-the-environment-i-have-selected-from-a-environment-picker/133972/4 "2024-05-14T10:45:47Z")

</div>

Thank you, I think that might help!

---

<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:** [May 28, 2024, 10:46am UTC](https://community.auth0.com/t/is-it-possible-to-change-tenants-at-runtime-based-on-the-environment-i-have-selected-from-a-environment-picker/133972/5 "2024-05-28T10:46:36Z")

</div>

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