1

Can i have ADFS authentication mechanism for 1 subsite and SSO implementation for 3-4 subsites ? i am using Claims based authentication.I have ADFS already configured.I have 1 webapplication and have around 12 subsites.Each subsite represent 1 client.Everythings fine. Now i am planning to implement SSO for 2 clients and rest clients needs to work with the ADFS.But for claims if i have 2 authentication provider STS&ADFS.i would get

enter image description here

I don't want SSO to use this page ,instead they should be taken directly to the Sharepoint Site without credentials.And ADFS should be taken to the ADFS login page .FYI I am using SAML 2.0 to SAML 1.1 conversion to implement SSO

2 Answers 2

1

Authentication is managed at the web application level only. It is not possible to have sites within the same web application use different authentication providers unless the entire application supports those providers.

Maybe this article will help: http://msdn.microsoft.com/en-us/library/hh237665.aspx

1

Finally i got it to work :

SPWebApplication app = SPContext.Current.Site.WebApplication;
SPAlternateUrl u = app.AlternateUrls[Request.Url];
SPUrlZone zone = u.UrlZone;
SPIisSettings settings = app.IisSettings[zone];
string components = Request.Url.GetComponents(UriComponents.Query, UriFormat.SafeUnescaped);
string AuthProviderString;
if (flag == 1)
    AuthProviderString = "SAML_STS";
else
    AuthProviderString = "Staging External Users";
foreach (SPAuthenticationProvider provider in settings.ClaimsAuthenticationProviders)
{
    if (string.Compare(provider.DisplayName, AuthProviderString, true, System.Globalization.CultureInfo.CurrentUICulture) == 0
        || string.Compare(provider.ClaimProviderName, AuthProviderString, true, System.Globalization.CultureInfo.CurrentUICulture) == 0)
    {
        string url = provider.AuthenticationRedirectionUrl.ToString();


        SPUtility.Redirect(url, SPRedirectFlags.Default, this.Context, components);
    }
}

http://blog.repsaj.nl/index.php/2010/05/sp2010-creating-a-mixed-mode-login-page-for-claims-based-authentication/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.