Search This Blog

Monday 9 September 2013

Claim based authentication (SP13) cannot resolve user ids from Classic windows authentication


SP13 people picker cannot resolve SP10 user ids(e.g: domainname\userid). You have to prefix the user id with "i:0#.W|".
You can add this string as a property, because it wont work with SP10, so you have make it as empty string for SP10.

string mangr = "i:0#.W|" + userProfile["Manager"].ToString();                                                                               
                                        peApprover.Accounts.Clear();
                                                                         
                                        PickerEntity pickerEntity = new PickerEntity();
                                        pickerEntity.Key = mangr;
                                        pickerEntity.IsResolved = true;
                                        ArrayList arrayList = new ArrayList();
                                        arrayList.Add(pickerEntity);
                                        peApprover.UpdateEntities(arrayList);

No comments:

Post a Comment