Azure AD Express Authentication

Kevin Azure 141 Reputation points
2020-02-10T17:21:09.283+00:00

I am using Azure AD Express Settings for Authentication for an Angular App.
It is working fine.

I need to put 30 minutes idle timeout for the ID/Access Token

  1. how i will set idle timeout in express settings?
  2. will there be automatic extension of token if user continuously use for 2 hours?
  3. should i refresh the token with access token?

Please advice.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,131 questions
0 comments No comments
{count} votes

Accepted answer
  1. FrankHu-MSFT 976 Reputation points
    2020-02-11T02:04:25.023+00:00

    Hello @PaulAzure-8925,

    How i will set idle timeout in express settings?

    You will need to setup a lifetime policy per the docs here :

    https://learn.microsoft.com/en-us/azure/active-directory/develop/registration-config-change-token-lifetime-how-to

    https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-configurable-token-lifetimes#example-token-lifetime-policies

    Depending on your requirements per the docs, you may need to get the application ID by switching to the custom view of the App Service's Easy Auth Settings.

    Will there be automatic extension of token if user continuously use for 2 hours?

    Per the SO : https://stackoverflow.com/questions/45819990/azure-ad-easy-auth-expires-even-when-users-are-actively-using-application

    You will need to refresh your token yourself. Please see the answer from Chris Gillium in the SO post for more information

    Should i refresh the token with access token?

    That's not how the access token works, refresh tokens are used to get new access tokens. For more information on how the OAuth2 flow works for auth code, oidc, or refresh please refer to the docs below :

    https://learn.microsoft.com/en-us/azure/active-directory/develop/authentication-scenarios

    https://learn.microsoft.com/en-us/azure/active-directory/develop/authentication-flows-app-scenarios

    0 comments No comments

0 additional answers

Sort by: Most helpful