I was wondering if it is a possibility to reauthenticate to another Azure app when the authentication failed of the first app. In multiple .NET apps, I'm using OpenIdConnect to authenticate to an Azure app. When a user is not assigned, it will trigger the AuthenticationFailed event.
In Azure I've created two apps and I would like to check authentication of those apps in a single web app. For the user at the frontend there should not change a thing. They should stay at the same website. This would mean that you should change the client id at runtime.
AuthenticationFailed = context =>
{
// set new client id and authenticate again
}
So, I would like to know if it is possible to reauthenticate to another app at the AuthenticationFailed event. A redirect to another webapp would be the last option. What would be the best solution for this?