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

I defined a multi value string for user profile properties in the backend of my SharePoint 2010. I'm reading the content from the created property like this: propertyValue = profile[propname].Value.ToString(); unfortunately i'm getting only the first stored value of the multi value field.

profile in the code is of type UserProfile and has GetUserProfile(accountName) from the UserProfileManager in it

Any Ideas how to get all multi values?

share|improve this question
up vote 1 down vote accepted

The profile property is actually a UserProfileValueCollection.


UserProfileValueCollection propertyCollection = profile[propname];
foreach(var prop in propertyCollection)
share|improve this answer
Are you sure that UserProfilePropertyCollection exists? Doesn't work for me and i can't find anything on the internet about it.. – Peter Oct 21 '11 at 16:03
On the top of my head it's UserProfileValueCollection in stead of UserProfileProperyCollection – Anita Boerboom Oct 21 '11 at 18:55
Sorry, I was working off 2007... If you use 'var' it should work ok... – SHug Oct 21 '11 at 22:12
Just tested it - my code looks like this: ` if (profile[propname].Value != null) { UserProfileValueCollection propertyCollection = profile[propname]; propertyValue = propertyCollection.ToString(); } else { propertyValue = String.Empty; } sectionProperties.Add(propDisplayName, propertyValue);` still there ist just one Value inside of the propertyCollection – Peter Oct 27 '11 at 13:30
Edited per suggestion – SPDoctor Dec 29 '12 at 11:15

Your Answer


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

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