SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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:

share|improve this answer
up vote 1 down vote accepted

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";
    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);

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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