且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 Web 应用程序中从 Azure AD 刷新 ID 令牌?

更新时间:2023-02-15 07:57:23

很遗憾,AAD 不支持刷新 ID 令牌.只能刷新访问令牌.请参阅此处:https://azure.microsoft.com/en-us/documentation/articles/active-directory-protocols-oauth-code/#refreshing-the-access-tokens

Unfortunately AAD does not support refreshing the ID token. Only the access token can be refreshed. See here: https://azure.microsoft.com/en-us/documentation/articles/active-directory-protocols-oauth-code/#refreshing-the-access-tokens

但即使可以刷新,在使用其他服务进行身份验证时使用访问令牌更正确,因此我建议更改您的应用程序以这种方式工作.访问令牌和 id_token 的声明非常相似,因此它不应该是一个非常破坏性的更改.

But even if it could be refreshed, it's more correct to use an access token when authenticating with another service, so I suggest changing your apps to work this way. The claims on the access token and the id_token are very similar so it should not be a very disruptive change.