-
I work for a food manufacturing company who is currently looking to move all authentication and authorization for their web based software to AzureAD. We are single tenant and all our software is hosted in house and so we would start by using AzureAD for just SSO. One of the items I am looking into is "In the event of an internet outage or azure outage, how can we minimize downtime of the software." To help solve this, I have, through azure policy, adjusted the lifetime of our access token to their maximum as the threat of token leakage is small since everything is in house. Even though our access tokens have a long lifetime, I want to be able to refresh the access token at a more frequent interval. Say for example, every 4 hours they get a new token that is good for another 24. Reason being is shift work. Looking for guidance here and a little bit of direction. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
If you extended the token lifetime (https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-configurable-token-lifetimes), MSAL.NET (used by Microsoft.Identity.Web) will proactively refresh the token as explained in Pro-Active Token renewal. This happens based on Azure AD's guidance which emits an optimized date for refresh (the refresh-in). @scsloan : does it work for you, or do you need more control? |
Beta Was this translation helpful? Give feedback.
-
you could also force the renewal of the token when you wish by:
Note that, is you are using client credentials (daemon scenarios), there is no refresh token, so doing it on |
Beta Was this translation helpful? Give feedback.
If you extended the token lifetime (https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-configurable-token-lifetimes), MSAL.NET (used by Microsoft.Identity.Web) will proactively refresh the token as explained in Pro-Active Token renewal.
This happens based on Azure AD's guidance which emits an optimized date for refresh (the refresh-in).
@scsloan : does it work for you, or do you need more control?