Blazor WASM - AzureAD - Login MAX_AGE parameter in URL

Occasional Visitor
Context : I have a Blazor WASM (.Net 6) application, that uses AzureAD to authenticate and get its data from a standalone API (this API does not host the Blasor APP). Everything goes well user authenticate with their Azure AD credential on the Blazor client and get tokens from Microsoft to query the API.

Question : I would like to force a user to reauthenticate after a while regarding certain condition (for example a user is in a group that has a access to sensitive data). To achieve this I would like to trigger again the authentication process. My goal was to simply make this kind of call :
```
NavigationManager.NavigateTo($"/authentication/login?returnUrl=https://localhost:5001/home");
```
The problem is that I haven't found any solution to tell to the `RemoteAuthenticatorView` to set up Max_age parameters when calling Microsoft API. Without this Max_Age parameter, Microsoft api see that the use is already logged in and therefore does nothing, it just redirect to the home page.

Any Idea ?
1 Reply

Hi @Sebatien

Thanks for posting your issue here.

However this platform is used for how-to discussions and sharing best practices for building any app with .NET.Since your issue is a technical question, welcome to post it in Microsoft Q&A forum, the support team and communities on Microsoft Q&A will help you for any technical questions.
Besides, it will be appreciated if you can share it here once you post this technical question Microsoft Q&A.
Best Regards,
Lan Huang