Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

When I try to add user/group using SharePoint OM or Power Shell script I'm getting the following error. In this example S-9-9044-V is an AD Group.

The user does not exist or is not unique

$web = get-spweb "http://sharepoint/Year9.SCI"
$group = $web.sitegroups["Year9.SCI Students"]
$user = $web.EnsureUser("school\S-9-9044-V")
$group.AddUser($user)

I also noticed that this happens only for few AD groups and I'm able to add other users/groups successfully. Some suggested to reconfigure object cache user accounts but that doesn't help as I'm able to add other AD groups using the same script. http://technet.microsoft.com/en-us/library/ff758656.aspx

Any suggestions?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

The group was removed from Active Directory and that caused the issue, but people picker showed the group as available.

share|improve this answer

Seems like a problem with User Profile, sometimes the profile is not created successfully or there is a profile sync problem! You can do it manually by running powershell:

update UserProfile via Powershell with Set-SPUser

If that doesn't help, try using the Group somewhere else like adding it in Windows Administrators or logging the system with this account! If that doesn't works that means the user/group is not created correctly in AD

share|improve this answer
    
I can add the AD group to Sharepoint using People picker but not through Powershell of OM –  Kannan Jan 18 '13 at 4:02

Your Answer

 
discard

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.