Can't see a refreshToken under identities, using auth0-react and Microsoft IDP

I am trying to get the refreshToken under identities for users, in order to renew the access to Microsoft Graph Api, because the accessToken is valid for 1 hour.

So far:

  • auth0-react:
onClick={() => loginWithRedirect({
                                    redirectUri: process.env.NEXT_PUBLIC_REDIRECT_URI_APP,
                                    scope: 'offline_access',
                                })}
  • user management api is working, returning me a token;
  • this token allows me to call /api/v2/users. the user is returned with the access token.

I have read:

I tried:

  • deleted the user, logged in again, allowed offline access, and still no refreshToken under identities

Any suggestion on what could be missing?

I switched to @auth0/nextjs-auth0 and still have the same issue. I added the offline_access to .env.localAUTH0_SCOPE='openid profile email offline_access'

I can get the access_token from the user management api, but still no refresh_token :frowning:

Am I setting the offline_access in the right place (.env.local)?