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

How do I get user profile service to create the associated users in SharePoint and put them into a specified user group?

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

Why would you want to do that? If you've setup your user profile service, you can use that to sync your user profiles into SharePoint. It does a bunch more stuff, but basically that's it.

If you want to do things like provide access to your portal to everyone in your AD, you can just grant rights to NT AUTORITY\Authenticated Users and all users will have access. There's even options in the people picker to choose all users.

If you want specific groups to have access instead, you can also do that by either granting rights to Active Directory groups, or creating groups of users within SharePoint and granting rights to those. So when you've got a new employee coming in, just add an AD account, add that account to the appropriate group and you're off.

And if this is not a valid answer, please provide some more details on why you'd want to acheive this.

share|improve this answer
    
I've attempted to grant permissions to the active directory OU (not group). Can UPSS do that? –  user2903 Oct 5 '11 at 20:18
    
No, an OU is just a container, you cannot grant permissions on that. Create a group with those same users in it and grant access to the group instead. –  Jasper Oct 5 '11 at 20:24
    
Create a group that contains the accounts in that OU and add that group to SharePoint al la: "domain\domain users". –  webdes03 Oct 5 '11 at 20:27
add comment

If this is SharePoint 2010, Try a PowerShell looking something like this (note: not tested, use at own risk and test throughly, if your AD melts into the ground after this I'm not responsible, yadda yadda)

Add-PsSnapin Microsoft.SharePoint.PowerShell
$Dom = "LDAP://OU=(your OU),DC=(your domain)"
$Root = New-Object DirectoryServices.DirectoryEntry $Dom
$selector = New-Object DirectoryServices.DirectorySearcher
$selector.SearchRoot = $root
$adobj= $selector.findall() where {
$_.properties.objectcategory -like "CN=Person*"
}
foreach ($person in $adobj)<br/>
{
    $prop=$person.properties
    Set-SPUser -Identity $prop.cn -Web (your SharePoint Site) -Group (your sharepoint group)
}
share|improve this answer
    
Yikes, that kinda scary. –  user2903 Oct 7 '11 at 0:03
    
My advice now Kurtnelle if you're going to be administering SharePoint 2010 if you take away only one piece of advice from Stackexchange, learn PowerShell...it makes you well...powerful :-) –  tekiegreg Oct 7 '11 at 15:01
add comment

Your Answer

 
discard

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