2

Our sharepoint user profiles are configured to have two additional AD synchronized, public custom properties, EmployeeID and CostCenter.

I need to read a list of users with the same CostCenter as the current user. I currently do this by iterating through all user profiles, but this takes about 30 sec. for >400 users. Is there some sort of CAML or similar query which can be used to "select" all users with CostCentre=x? Unfortunately CostCentre ist not a column in the "User Information List", so the nearby solution won't work.

Thanks!

2

If you need Cost Center in the user info list, you have to mark it as Replicable in the User Profile Service Application. I never use the User Info List for these types of solutions, I always use Search, it is significantly faster and more scalable.

You have to:

  1. Crawl your user profiles.
  2. Promote the People: Cost Center property to a managed property
  3. Crawl again
  4. Use the new managed property in a query for people with your desired cost center.
  • I just need the employee IDs (another custom property) in a specific cost center. Why is that faster with search than a simple CAML query? – elsni Mar 17 '14 at 8:04
  • It's an alternative. I cannot say that it is actually faster, though most often it is. If you want to do it your way, you need to set the properties as replicable and then wait for replication to all of your site collections. With search the properties are populated after a crawl and do not need to be stored in every site collection. – Matthew McDermott Mar 17 '14 at 13:13
  • That means that non-replicable properties will not show up in the User Info list, where are they stored? – elsni Mar 18 '14 at 7:00
  • That's the point of the replicable property. The User Profile properties are stored in the User Profile Database. If you replicate them they end up on every User Info list, thus they are pushed into the content databases. The user info list is a hold over from Foundation (WSS). If you have Server, use the User Profile. – Matthew McDermott Mar 18 '14 at 15:42
0

This is because the SharePount User Information List is not in sync with your User Profile Application Service - so first you should go to Central Admin and run the timerjob User Profile to SharePoint Full Synchronization

This should now have sync'd the two and they should offer the same information.

Now you should be able to query the User Information List just like you would any other.

If that is still not the case, try clearing the User Profile Application Servise database and run the User Profile to SharePoint Full Synchronization timerjob again.

Use STSADM clear the user profile database,

Stsadm.exe –o sync –deleteolddatabases 0
  • I did both, but the User Information List still lacks columns for my custom properties. But the properties' contents can be changed in the user profile. Apparently the contents of the custom properties are not stored in the User Information List. – elsni Mar 13 '14 at 12:06

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.