Wednesday, June 27, 2012

SharePoint 2010 FBA with UAG SSO


We are working on Extranet site which is on UAG. We followed below blog to configure single sign on in SharePoint

http://microsoft-iag.blogspot.com/2010/10/uagenable-sso-by-passing-user.html

User able to see SharePoint FBA site when login through UAG (outside network) with forms authentication.
Here we have a problem like it is showing windows/forms authentication screen (as shown in below picture)



When users selects “forms authentication” from dropdown it is going to home page without asking credentials. however it should not ask.

for this I have implemented java script code (in the sign in page)to redirect to home page automatically with out selecting dropdown.



C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IDENTITYMODEL\LOGIN


<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">

<script language="javascript" type="text/javascript">


    function changeDropdownValues() {


        var ddlLogin = document.getElementById("<%=ClaimsLogonSelector.ClientID %>");

ddlLogin.options[1].innerText = "Internal Employees";       
ddlLogin.options[2].innerText = "External Partners";
        ddlLogin.options[2].selected = true;
    }

     
    _spBodyOnLoadFunctionNames.push("changeDropdownValues");


</script>


<div id="div1" style="display:none">
<SharePoint:EncodedLiteral runat="server"  EncodeMethod="HtmlEncode" Id="ClaimsLogonPageMessage" text="Select the credentials you want to use to logon to Extranet site" />
</div>

<SharePoint:EncodedLiteral runat="server"  EncodeMethod="HtmlEncode" Id="ClaimsLogonPageMessage1" text="Select the credentials you want to use to logon to   Extranet site" />
<br />
<br />

<SharepointIdentity:LogonSelector ID="ClaimsLogonSelector" runat="server" />

<br />
<br />

<SharePoint:EncodedLiteral runat="server"  EncodeMethod="HtmlEncode" Id="Message1" Text="Note:Employees please select Windows Authentication."  />
<br />
<SharePoint:EncodedLiteral runat="server"  EncodeMethod="HtmlEncode" Id="Message2" Text="All other users please select Forms Authentication."  />
</asp:Content>

4 comments:

  1. HI Surya,

    Thanks for your reply.

    In My case both Internal and External users will be accessing the sharepoint site from UAG.So once the user enter the credential in UAG login page,it should directly take the users to sharepoint site without asking them to enter the credential again.How to acheive this single sign on in UAG? Please advise.

    ReplyDelete
  2. Hey Chandra, Can you call me at 860-705-3792 ? or give me your mobile number i will call u.

    ReplyDelete
  3. Thanks for your Response. Please check this link http://winsec.se/?author=27

    ReplyDelete
    Replies
    1. Hi Surya

      I followed the steps given in your blog to bypass the windows / forms authentication screen but it didn't work for me. It just selected 'External Partners' in the dropdown and stayed in the same page.
      Any other file to be updated in order to bypass the authentication screen? please suggest.

      Delete

Followers