SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Question is pretty simple: when implementing a custom SPClaimProvider in 2010, do the claims have to be known at provider install time?

Some background

I had been spinning around getting nowhere trying to implement a custom claims provider. I could get the people picker to show my claims and generated hierarchy nodes and PickerEntity instances just fine, but the selections didn't "stick" in people picker once I clicked "Add" and "OK".

To that point, I had been dynamically generating the claim types in the call to FillClaimTypes. However, I finally noticed that there was an error during on install pass when the feature was activating -- the FillClaimTypes method raised an error because it couldn't connect to the datasource to generate the dynamic claim types. More importantly, when I created a SPClaim instance for the PickerEntity, I always received null from SPClaim.ToEncodedString() which caused the people picker control to misbehave.

So this raised the thought: hmm -- seems like the claim types are read at install time via a call to FillClaimTypes and the claim type MUST be registered at this time.

Indeed, once I switched to hard-coded claim types at install-time, I was able to get it all working right. So I wonder if it can be confirmed that the claims are registered at install time per claim provider. If so, are there other ways around this? Ideally, I'd like to be able to dynamically create claim types over the lifetime of the system without having to re-install the claim provider.

share|improve this question
Have you found an answer? I am wondering the same thing. – user8190 May 4 '12 at 7:10
Yes. So the answer is that indeed, the claims must be known at install time. If you put in some trace logging code, you'll see that FillClaimType is called at install time. This is my observation only, however. I have no had confirmation from any other sources that this is how this was specified. – Charles Chen May 5 '12 at 12:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.