0
votes

In MSAL-broswer, other than using ssoSilent is there any other way to non-interactively extend the AAD session of the user?

The refresh token aquired after interactive calls always has a duration of 24 hours, which is same as the default duration of AAD session. Now after 24 hours the user will be be forced to login in, even if he has been regularly aquiring access tokens from the token end point via the refresh token, because AAD session will have expired and the refresh token would have expired. ssoSilent is meant to be used after the refresh token has expired (according to the documentation - https://azuread.github.io/microsoft-authentication-library-for-js/ref/classes/_azure_msal_browser.publicclientapplication.html#ssosilent)

I am not looking for a solution using keep me signed in option to have a long living AAD seesion(inactivity with respect to API calls of 24 hrs should make the user log in). I am looking for a solution like MSAL.js where every new access token acquired automatically extends the AAD session for another 24 hours.

ssoSilengt could be used, but is that the right approach - and if so when to call it?

1

1 Answers

0
votes

In MSAL-broswer, other than using ssoSilent is there any other way to non-interactively extend the AAD session of the user?

No, there is not.

ssoSilengt could be used, but is that the right approach - and if so when to call it?

One thing to note is that MSAL Browser will attempt to silently renew your refresh token if it has expired (i.e. you don't need to invoke ssoSilent yourself after 24 hours). In theory, you can invoke ssoSilent before the 24 hours expiration if you would like to proactively extend the user's session, however, that adds more complexity to your app (and we don't provide samples for doing this). Generally speaking, we recommend that apps do not proactively attempt to renew sessions/tokens, as it introduces complexity (that is otherwise handled by teh library) and can result in an undesired UX.