We have successfully implemented OpenID Connect using Microsoft Identity on our ASP.NET Core v5 web site. It logs in and logs out perfectly, except that it would be great if we can find a way to redirect users back to the page they were on and not just one of the configured Redirect URI's in Azure Active Directory for the application.

The site that is being created will have hundreds of pages so it's not possible to add them all to the Redirect URI's section.

I can't seem to find any documentation that supports passing the relative URL to Microsoft to return the user back to the specific page they were on.