问题
I have a refresh token that got generated for office365 login. I generated it using the following set of permissions
openid offline_access Calendars.ReadWrite.Shared profile email https://graph.microsoft.com/User.Read
Now I want to generate an access token from the refresh token with some different set of permissions like following
Group.Create, Group.ReadWrite.All, Directory.ReadWrite.All
Is it possible to have an access token from refresh token with some different set of permissions?
Any help here plz.
回答1:
Is it possible to have an access token from refresh token with some different set of permissions?
No, it's impossible.
The new access tokens can have the same expiration and scopes as the original access token, or can be specified to have a shorter lifespan as well as a smaller subset of scopes from the original access token. New access tokens can be generated in order to replace the original token or generated to serve as an additional token. You can also use refresh token calls to fully expire the original access and refresh tokens and any permissions granted by the user.
来源:https://stackoverflow.com/questions/59451788/re-generate-access-token-from-refresh-token