Search code examples
c#azureliveclaims-based-identityacs

extract nameidentifier claim from windows live


I need to extract nameidentifier claim from windows live. I searched for the code, most of the places, I found using Azure access control service. I don't want to use Azure ACS. Is it possible to achieve this only using C#, asp.net?


Solution

  • Are you able to get a SAML token back from Live ID? If so, the NameIdentifier should be found within the saml:Subject.

    If your website is using WIF, then after a successful authentication you should already find this nameidentifier claim inside the IClaimsPrincipal object. (e.g. HttpContext.Current.User)