Quantcast
Channel: Active questions tagged adfs - SharePoint Stack Exchange
Viewing all articles
Browse latest Browse all 36

How to do single sign on between an asp.net application and existing sharepoint web application which is claims enabled

$
0
0

I want to implement single sign on between an asp.net application and an existing SharePoint web application which is claims authentication enabled.

  1. asp.net application is farm authentication enabled and itauthenticate users from sql server database.
  2. i created a custom STS service using asp.net security token serviceapplication using windows identity foundation in customsecuritytokenservicce class methods in GetOutputClaimsIdentity i added email outputIdentity.Claims.Add(new Claim(ClaimTypes.Email , "adil@test.com"));to issue email claim
  1. i added sts reference to asp.net application

  2. the same sts i registered using powershell to my sharepoint web application

    $cert=New-object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\SPPROJECTS\STS\stscert.cer")$map1 = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" -IncomingClaimTypeDisplayName "EmailAddress" -SameAsIncoming$map2 = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.microsoft.com/ws/2008/06/identity/claims/role" -IncomingClaimTypeDisplayName "Role" -SameAsIncoming$realm = "http://sp2010/_trust/default.aspx"$ap=New-SPTrustedIdentityTokenIssuer -Name "STSPRO" -Description "Our Fancy CustomSTS" -Realm $realm -ClaimsMappings $map1,$map2 -ImportTrustCertificate $cert -SignInUrl "https://localhost:96/login.aspx" -IdentifierClaim $map1.InputClaimTypeNew-SPTrustedRootAuthority -Name "sp2010" -Certificate $cert

now when i open sharepoint site it shows two authenction opetions to login to sharepoint site, when i login using customsts i able to login to sharepoint site andit shows adil@test.com user , before that i added this user in sharepoint as administrator.

Now here

  1. How to wirte code the custom sts can validate user from sql server
  2. how i do or implement single sign on from asp.net to sharepoint site

when user authenticated to asp.net application and when user goes to sharepoint site from asp.net it would not ask authentication


Viewing all articles
Browse latest Browse all 36

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>