I am new to using ITfoxtec for Azure Active Directory SAML logins. I read the StackOverflow entry for [Nuget ITfoxtec SAML & Angular](https://stackoverflow.com/questions/60041640/nuget-itfoxtec-saml-angular) (and other similar entries for CORS issues), but I still do not understand how to adapt the GitHub Angular example from <https://github.com/ITfoxtec/ITfoxtec.Identity.Saml2> to my needs. When running the ITfoxtec GitHub example, the Login method of the AuthController.cs file is immediately executed when I launch the test Angular application, and brings up the Azure Active Directory login prompt.

For my application, I need to click a "Login using Azure Active Directory" button on the Angular front end to call a backend method that can then redirect to another method to attempt login.

.NetCore C# code:

```
SSOController.cs file:
// This method is called by an Angular front end button when the user wishes to log in via Azure Active Directory SSO
        [AllowAnonymous]
        [Route("AzureAuth")]
        [HttpGet]
        public IActionResult AzureAuth(string returnUrl = null)
        {
                    var binding = new Saml2RedirectBinding();
                    Saml2Configuration config = GetSamlConfig();

                    binding.SetRelayStateQuery(new Dictionary<string, string> { { relayStateReturnUrl, returnUrl ?? Url.Content("https://localhost:44397/api/sso/AssertionConsumerService") } });
                    //return binding.Bind(new Saml2AuthnRequest(config)).ToActionResult();  
// This gives a CORS error, so we have do ensure that we do the redirection at the backend
// so we try redirecting with "RedirectToAction"
                     return RedirectToAction("https://localhost:44397/api/sso/AssertionConsumerService"); 

        }

```

My AssertionConsumerService() method (located in Dev at "https://localhost:44397/api/sso/AssertionConsumerService"), which I need to be redirected to:

```
        [Route("AssertionConsumerService")]
        [HttpPost]
        public async Task<IActionResult> AssertionConsumerService(HttpRequestMessage request)
        {
// After user enters AAD SSO information, redirect should point to here.
// This API endpoint is hit if I test from Azure Enterprise Application SSO testing with the redirect API set to this method.
// I do not understand how to do backend redirects from AzureAuth() method to this method, and ensure that the HTTP request data is correct.
}

```