This project has moved and is read-only. For the latest updates, please go here.

Resolving federated identities

Nov 13, 2012 at 3:37 PM

Great work on this claims provider for AD users coming from ADFS!

Next is how to deal with federated users when we cannot do any sort of name resolution. For example, our ADFS is federated with, or via the Azure ACS, federated with Google, Yahoo, etc.

In planning to write my own claims provider for this I was thinking something along the lines of:

If input contains '@' and not

  assume this is an external email address..
  check for general well-formed email address, but just resolve no matter what


  do resolution against our AD...



Nov 14, 2012 at 7:54 AM

many thanks for your feedback.
Latest version contains a property that allows to always resolve user input for each of the claim type specified in the trust (whatever it exists in the LDAP or not).
Does this address your needs?


Nov 16, 2012 at 7:25 PM

I do not believe the 'always resolve' option works for this case. I want to do LDAP (AD) lookup on all input *except* where it looks like an external email address -- @something but not

Our users are in '' and federated external users are,, etc, where we have no ability to do lookups.

Something along these lines:

if (searchPattern.ToLower().Contains("") || 
	searchPattern.ToLower().Contains(@"ourdomain\") || 
	searchPattern.ToLower().Contains(@"\") || 
	(!searchPattern.ToLower().Contains('@') && !searchPattern.ToLower().Contains('\\')))
	// do LDAP lookup
else if (searchPattern.ToLower().Contains("@"))
	// assume external user and resolve as identity claim (no validation)
else if (searchPattern.ToLower().Contains(@"\"))
	// assume external group and resolve as role claim (no validation)
Nov 22, 2012 at 12:46 PM

What could be done is to use a configurable prefix (for example "EXT-") to say that the input should be validated without resolving it.

For example, if the user types, LDAPCP resolves for each claim type.

What do you think about that?

Jun 18, 2014 at 7:47 AM
Hi Yvan

Dougans suggestion would be exactly what we need. Do you think it would be possible to program a behaviour like this?

Jun 18, 2014 at 12:33 PM
Hello Sandro,
the actual implementation is slightly different:
if you configure a prefix (for example "extuser:"), LDAPCP will resolve users like this:
  • user types "value": LDAPCP will make LDAP lookup to find "value"
  • user types "extuser:value": LDAPCP will bypass LDAP lookup (for the claim type where prefix is configured) and create permission "value"
    It's not very different from the implementation suggested by ddugan and very simple to configure: set a prefix or don't.
    Would that fit your needs?