views:

63

answers:

2

To get a new user in SharePoint with Windows Authentication, do you log on to the server and add the user manually / you develop some web part in SharePoint to Administer the AD?

A: 

You can do it the first way and add the user manually by adding them to the server or domain.

You can also do it through code, in something like a webpart

ACBurk
ACBurk, I think the code you have posted would assign Roles to the users existing in AD, I need to add a new user to the AD and then provide roles to the user. pl correct me if I am wrong.
Pradeep007
Yeah, taking a second look at it, I think you're right.I don't know if you can add a user to AD through Sharepoint programmatically but I would guess that you can't.I think you would have to add them to the server or AD, somewhere where SP can find the Win account.
ACBurk
A: 

As far as I know there is now built in way to add users to the AD through SharePoint. But there are some 3rd party solutions out there offering webparts which will do job.

Another way would be to develop your own web part using the Directory Services. With the Directory Services assembly you can access a directory like an Active Directory or LDAP and communicate with it.

Flo