The custom claims provider in your server farm is activated for all the Web Applications by default as it has to be globally deployed. This may cause you an issue if you are using FBA on another Web Application and would return users even though the authentication provider is not your custom Trusted Claims provider. To make sure that you don’t get the error message
The user is not unique or doesn’t exist.
In the constructor of the custom claims provider set a boolean isTsClaims( is Trusted Claims) and load the FillResolve, FillHierarchy and FillSearch methods only if the boolean value is true.
SPSite site = SPContext.Current.Web.Site; SPIisSettings settings = site.WebApplication.IisSettings[SPUrlZone.Default]; if (settings.ClaimsAuthenticationProviders != null) { foreach (SPAuthenticationProvider provider in settings.ClaimsAuthenticationProviders) { if (provider.DisplayName.Equals("YOURCLAIMPROVIDERNAME") || site.WebApplication.IsAdministrationWebApplication) { isTsClaims = true; } } } else { if (site.WebApplication.IsAdministrationWebApplication) { isTsClaims = true; } }

