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 have a big problem. I would like add a user to a list item via SPFieldUserValue. But this user has never used the Sharepoint site before. So I can not select the SPUser-Object of this user from a SPUserCollection.

With the UserProfileManager I can select the profile of the user but I can not convert this profile to a SPFieldUserValue.

Any Ideas?

share|improve this question
up vote 2 down vote accepted

Use SPWeb.EnsureUser that'll make sure the user exist on the site

share|improve this answer
Great it works :-) – AHO Jul 17 '12 at 15:30
Snippet of my solution $upm = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context) $AllProfiles = $upm.GetEnumerator() foreach($profile in $AllProfiles){ $accountName = $profile[[Microsoft.Office.Server.UserProfiles.PropertyConstants]::AccountName].‌​Value $lookupUser = $web.EnsureUser($accountName) } – AHO Jul 17 '12 at 15:32

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.