My user profiles have some custom properties. Now I need to get a list of all values that this custom property has on any user. This code return an error that "Column 'Division' does not exist. It may have been deleted by another user".
Is this the right approach? There is many users and possible many distinct values.
SPListItemCollection userInformationList = SPContext.Current.Web.SiteUserInfoList.Items; var divisions= (from SPListItem userItem in userInformationList.Items where userItem["Division"] != null select userItem["Division"]);