Recently I needed to change the authentication of one of the application that I did using SharePoint to forms. I needed to authenticate users using Active Directory (AD). Even there are many sources explaining how to do it I found most of them are not full. So thought to put an article my self.
The default authentication method of SharePoint is Windows. It will use a window to get the user information while logging in.

To change the authentication first you need to login to the Administrator site.
Now select Application Management and click on the link Authentication Providers under Application Security.


In the Edit Authentication page select Forms as the Authentication Type then in Membership Provider Name type AD, which we are to setup later. Then click the Save button.

To do the necessary changes open both Web.Config files. Both files needed to be updated with the same information.
1. In the connection strings section add the following line.

This specifies the connection string to the AD. (Please note that my full computer name is 'ironone-ms-t01.MS.TEST' and my domain is 'MS.TEST'. You definitely need to change them according to your domain details.
2. Inside System.Web add a membership provider by entering the following text.

Application Web.Config


Save both Web.Configs and do an IIS reset.
Go back again to the administration site and select Application Management. Now select Policy for Web application under Application Security.
After making sure that the correct web application is selected, click on Add Users.

Select the Default as the zone and click next.
When choosing users type the full user name preceding AD:. For example to add administrator type AD:Administrator. Under the permission section select the Full Control - Has full control check box and click Finish.




No comments:
Post a Comment