1

We've switched to claim based authentication (Windows + FBA on the same web application in the same zone) and something strange happens with peoplepicker.EntityData dictionary. Before claims (in classic mode) we use picker.EntityData["PrincipalType"] to recognize user or group. But now picker.EntityData["PrincipalType"] is null.

Interesting fact, when I try to enter FBA user in picker EntityData["PrincipalType"] is presented, but for Windows users it is always null. Actually, for Windows users EntityData contains Email, Title (and some other) but they are all empty strings.

Have you experienced such issue? What is the case of this behavior?

Thanks in advance.

1

Yes, I've seen this with claims authentication method. For users pickerEntity.EntityData["PrincipalType"] is null but for groups it works fine.

There is a property pickerEntity.EntityType that works for users but not for groups, so I use the following:

var entityType = string.IsNullOrEmpty(pe.EntityType) ? pe.EntityData["PrincipalType"].ToString() : pe.EntityType;
SPPrincipalType principalType = (SPPrincipalType)Enum.Parse(typeof(SPPrincipalType), entityType);
  • I'm just curious, is this expected behavior? Or should we setup clam based auth properly? For FBA all working good, but for Windows not... – Sergei Sergeev Apr 23 '14 at 6:49
  • I'm not sure. It doesn't look like a normal behaviour but I'm afraid we can't fix it. I couldn't find the root cause so I modified my code. – Naim Murati Apr 23 '14 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.