Getting claim value in custom authentication adapter for AD FS

37 Views Asked by At

I'm studying building a custom authentication method for AD FS in Windows Server following a MS tutorial: Build a Custom Authentication Method for AD FS in Windows Server.

I need to get authenticated user's data, eg. email address. Is it possible to refer to claims for this purpose? For example, can we create the following claim in the BeginAuthentication method:

System.Security.Claims.Claim claim = new System.Security.Claims.Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", claimValue);

If so, how do I get the claim value?

I know that Claim identityClaim is passed in the parameter of the BeginAuthentication method, but only one Claim can be passed there, and I need to process any user data that is passed by AD FS.

Thank you in advance for taking the time to help resolve this issue.

0

There are 0 best solutions below