Hi,
Seem to have encountered a strange issue although odds are I’m doing something silly.
I created a simple ASP.Net Web Form which has the below code to achieve an SP-initiated login.
protected void btnSubmit_Click(object sender, EventArgs e)
{
var ds = SingleSignOn.GetSingleSignOnUserByEmail(txtEmail.Text);
if (ds == null)
{
ltErrorMessage.Text = Alert.Danger("Please check email address." + Environment.NewLine + " Please email " + General.GetSupportEmail() + "for support.");
return;
}
var identityProviderName = ds.Tables[0].Rows[0]["identity_provider_name"].ToString().Trim();
SAMLServiceProvider.InitiateSSO(Response, "", identityProviderName);
ltErrorMessage.Text = Alert.Success("You will now be directed to login." + Environment.NewLine + " Please email " + General.GetSupportEmail() + "for support.");
}
As you can see the identityProviderName is returned from the database based on the users email address.
The strange thing is that it works exactly as expected on Firefox and I’m redirected to Microsoft to login but on Chrome and Edge I don’t get redirected at all.
Debugging and it is still reaching the SAMLServiceProvider.InitiateSSO call but as I say no redirection occurs.
Is there anything else I should be doing before or after the SAMLServiceProvider.InitiateSSO(Response, “”, identityProviderName); line?
Thanks in advance.