# How to silently re-authenticate a client to a new audience

**URL:** <https://community.auth0.com/t/how-to-silently-re-authenticate-a-client-to-a-new-audience/79207>\
**Category:** Get Help\
**Tags:** react-native, audience, access-token\
**Created:** [March 3, 2022, 12:15pm UTC](https://community.auth0.com/t/how-to-silently-re-authenticate-a-client-to-a-new-audience/79207 "2022-03-03T12:15:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![simon.radinn.com](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/simon.radinn.com/32/33814_2.png) [@simon.radinn.com](https://community.auth0.com/u/simon.radinn.com)\
**Post date:** [March 3, 2022, 12:15pm UTC](https://community.auth0.com/t/how-to-silently-re-authenticate-a-client-to-a-new-audience/79207/1 "2022-03-03T12:15:55Z")

</div>

We have a released app in the market and is authenticated using:

```auto
const credentials = await auth0.webAuth.authorize({
        scope,
        audience,
        connection,
      });

```

The issue is that the `audience` were apparently set to:

```auto
"aud": [
    "MANAGEMENT_API_IDENTIFIER",
    "https://my-domain.auth0.com/userinfo"
  ],

```

We have never used **Roles+Permissions** before so this has never been an issue on our backend. But now we need to use Permissions and therefore we created a new API in the Auth Dashboard and replaced the _MANAGEMENT\_API\_IDENTIFIER_ with our new _API_ in the `audience`.

We do not want all of our users to sign in again once we release the new client, so how can we get a new access token or re-authenticate silently but to our new `API audience` instead?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 3, 2022, 6:15pm UTC](https://community.auth0.com/t/how-to-silently-re-authenticate-a-client-to-a-new-audience/79207/4 "2022-03-03T18:15:04Z")

</div>

Hi @simon.radinn.com,

Welcome to the Auth0 Community!

I understand that you want to know if changing the audience will require your users to log in again.

I did a quick test to see if changing the audience to a different API required the users to log in again and it looks like it does indeed require a new login. Are you able to set up a test environment to see if you get the same behavior?

---

<div class="post-metadata">

**Author:** ![simon.radinn.com](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/simon.radinn.com/32/33814_2.png) [@simon.radinn.com](https://community.auth0.com/u/simon.radinn.com)\
**Post date:** [March 4, 2022, 7:22am UTC](https://community.auth0.com/t/how-to-silently-re-authenticate-a-client-to-a-new-audience/79207/5 "2022-03-04T07:22:13Z")

</div>

> [@simon.radinn.com](#):
>
> `auth0.webAuth.authorize`

Hi Dan,

Calling `auth0.webAuth.authorize` does not take any previous access, refresh nor id-Token, therefore it will always ask user again to re-authenticate.

And unfortunately the refresh token endpoint `/oauth/token` does not take an `audience` and therefore my question how to get an accessToken with the new audience.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 7, 2022, 6:29pm UTC](https://community.auth0.com/t/how-to-silently-re-authenticate-a-client-to-a-new-audience/79207/6 "2022-03-07T18:29:37Z")

</div>

I did a bit more investigating, and I found that a refresh token is only scoped to retrieve an access token with the same audience.

This means you will have to have your users re-authenticate to retrieve a new refresh token.

---

<div class="post-metadata">

**Author:** ![simon.radinn.com](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/simon.radinn.com/32/33814_2.png) [@simon.radinn.com](https://community.auth0.com/u/simon.radinn.com)\
**Post date:** [March 8, 2022, 7:32am UTC](https://community.auth0.com/t/how-to-silently-re-authenticate-a-client-to-a-new-audience/79207/7 "2022-03-08T07:32:39Z")

</div>

Thank you Dan for your answer.

This is quite unfortunate, however hopefully this will be an ok trade-off for the RBAC.

---

<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:** [March 23, 2022, 7:33am UTC](https://community.auth0.com/t/how-to-silently-re-authenticate-a-client-to-a-new-audience/79207/8 "2022-03-23T07:33:07Z")

</div>

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