Configure applications for MRRT
refresh_token.policies property of the application.
| Property | Type | Description |
|---|---|---|
audience | string | The Auth0 API identifier of the application that will have access to using the refresh token. |
scope | Array of strings | The list of scopes allowed when requesting an access token for the specified audience. The scope must be equal to or narrower than the scopes defined on the API. |
The audience and scope properties must correspond to an existing application in your tenant, otherwise the refresh token exchange will silently ignore them.
Implement multi-resource refresh token
Step 1: Authenticate and request a refresh token
offline_access scope when initiating the authentication request. To learn more, read Get Refresh Tokens.
If you do not receive a refresh token, confirm that:
- The API has Allow Offline Access enabled in its settings.
offline_accessis included in the scope.- The
audienceused in the request matches a configured API in your tenant.
Step 2: Exchange the refresh token for a different API
Step 3: Call the API using the access token
You can decode the access token on jwt.io to verify:
- The
audclaim matches the requested API. (for example: https://billing.example.com). - The
scopeclaim includes only permitted values.
Use Multi-resource refresh token with Actions
event.client.refresh_token.policies object that provides relevant information including and scope.
You can use the event.client.refresh_token.policies object to evaluate the application’s audience and scope, when issuing or exchanging a refresh token, and to ensure precise control over API access and scopes.
Evaluation logic
- If the audience parameter is omitted , Auth0 returns an access token with the original audience and any of its additional scopes configured in the MRRT policy.
- If a new audience parameter is specified , Auth0 verifies that the audience is included in the MRRT policy and returns an access token for the new audience with its configured scopes.
- If the scope parameter is omitted , Auth0 combines all allowed scopes from the original request and the MRRT policy.
- If a new scope parameter is specified , Auth0 validates the requested scopes and returns an access token with the scopes included in the MRTT policy. Invalid or unauthorized scopes requested are silently ignored.
- If the audience parameter is the same as from the original request , Auth0 applies the MRRT policy and returns an access token for the audience with all MRRT configured scopes and original authentication scopes.