Had a colleague ask me the other day if there was a limit on the People Picker control in SharePoint. Reason being is that she had a Person field setup to accept multiple users and had a group that was constantly getting the error “Item cannot be more than 256 characters” when trying to enter the users. After a bit more digging, found out they were using a list of about 20 people or so and then just pasting them into the people picker box. They had everything correct with semicolon separators and everything, but kept getting that error.
People Picker Limits
So did a bit of digging and People Picker does in fact have a limitation. It is defined by the function PeopleEditor.DefaultMaximumEntities property. You can find more information on it here. This property has defaulted to 200 since SharePoint 2007. So obviously this isn’t the cause of the problem.
Cause of the Issue
After some playing around and testing I found the problem isn’t actually with the people picker control itself, but actually the name checker functionality. When you tell the people picker control to check the names you have entered it passes the information it needs to via a string value. This value appears to be limited to 256 characters. It is probably because the actual box that is used for a multi-user people picker field is a single line of text so has the limitation of 256. So how can our users put in their list?
Resolution
The answer is actually to break up the checks into smaller groups. Once SharePoint has retrieved the users from a name check, it won’t resend them in any consecutive checks. This means, you could probably insert half of the names, click on ‘Check Names’ and then insert the next half and repeat. Following this, you will be able to reach your max of 200 users… should you want to.
Little More Information
I did some more digging after figuring out the resolution and turns out there is actually a Technet article on this exact issue. You can find it here. Basically, the string limitation I mention above was brought in intentionally in SharePoint 2010 as a security measure. Not sure exactly what that is for, but the only thing I could think of was it may deter people from creating mass notifications by forcing them to break up the entries? It’s very likely something else, but that’s all I could come up with.
Thanks for Reading!!!
Comments
Dave, it would not surprise me if the imposed limit is a result of the default sender limit in the underlying MS Exchange server. I have run into this sender limit a few times and it can be increased in the mail server, but SharePoint may have an imposed limit because it may not be able to determine the sender size limit for the email account being used.
Hey Kyle, not sure if you mean the error or the 200 name limitation. If you mean the 200 name limitation, you are likely correct.
However, if you mean the actual error message, then I think I disagree with you. I still stand by my belief it is an internal field that is used for the check names that is causing this. To test, I entered the same full list of names into my Outlook address line and all names were resolved with now issues.
I don’t think the number can be modified. Because SharePoint uses PeopleEditor.DefaultMaximumEntities you are limited to that property value. The property doesn’t have a setter, just a get function. Is there a way that you are aware to change that property?