简体   繁体   中英

Changing Azure AD B2C Access Token lifetime doesn't work

I went to my Azure B2C → User flows (policies) → A flow of type "Sign up and sign in V2" → Properties → Token Lifetime.

There I changed the "Access & ID token lifetimes (minutes)" from 60 to 15. Then I saved. I emptied the cache and refreshed the page to make sure that the value was really modified.

Today, more than 24 hours later, all my access tokens still have a lifetime of 60 minutes. I don't get it. I got the access token directly from a brand new authorization code.

Should I wait longer? Is it a bug in Azure? Or did I do something wrong?

I didn't reproduce your issue on my side. There is no delay for this change to take effect. Make sure you are using the same application(clientId) to retrieve the access token.

Here are my test steps and results for your reference.

1.Set the token lifetime to 60 minutes.

在此处输入图像描述

Get access token by using auth code flow.

Get auth code.

https://tonyb2ctest.b2clogin.com/tonyb2ctest.onmicrosoft.com/oauth2/v2.0/authorize?p=B2C_1_testsignupin
&client_id=c3a6429c-01XXX-ae02-1579b3f3fa9c
&response_type=code
&redirect_uri=https://windowXXXsbowman.azurewebsites.net/.auth/login/aad/callback
&response_mode=query
&scope=https://tonyb2ctest.onmicrosoft.com/api/user_impersonation
&state=12345

Get access token

https://tonyb2ctest.b2clogin.com/tonyb2ctest.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1_testsignupin

在此处输入图像描述

2.Set the token lifetime to 15 minutes.

在此处输入图像描述

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM