Share via


SharePoint 2016: Forms Based Authentication – Part 1

Form Based Authentication (FBA) is one of the Authentication Mode supported by SharePoint that allows us to implement our own authentication mechanism and helps to extend a SharePoint Site for Non-Active Directory (AD) Users.

While SharePoint default installation employs Active Directory to query User Profiles and to authenticate the Users using Windows Authentication, FBA uses the custom database hosted in conjunction with an AD to store User’s Credentials and the authentication, in this case, takes place using a database query to the FBA Custom Database for FBA User Profiles*.*

FBA becomes really important when it comes to the requirements where we need to expose SharePoint to the outer world. For example, Sharing documents with your Clients and Vendors or else.

In this article, we will see all the steps involved in implementing FBA with SharePoint and we can depict the process as per the Process Diagram below-

Process Diagram

https://howtodowithsharepoint.files.wordpress.com/2016/06/15.png?w=800

Step 1: Provision Web Application

In order to start with implementing FBA we need a Web Application and Site Collection hosted inside it. I have created both Web Application & a Site Collection using SharePoint UI.

https://howtodowithsharepoint.files.wordpress.com/2016/06/21.png?w=800https://howtodowithsharepoint.files.wordpress.com/2016/06/31.png?w=800

Step 2: Provision Membership Database

In order to provision Membership Database for storing user credentials, Microsoft has been provided with a utility “aspnet_regsql.exe”.

In order to execute this utility we follow the below steps:

  • Launch SharePoint 2016 Management Shell
  • Run the following commands:

CD \Windows\Microsoft.Net\Framework64\v4.0.30319

**          .\aspnet_regsql**

https://howtodowithsharepoint.files.wordpress.com/2016/06/41.png?w=800

Once we execute the commands above the Database Configuration wizard come up

  • Click Next on Welcome Screen

https://howtodowithsharepoint.files.wordpress.com/2016/06/51.png?w=800

  • Choose “Configure SQL Server for application services” on the Setup Option Screen
  • Click Next

https://howtodowithsharepoint.files.wordpress.com/2016/06/61.png?w=800

  • Enter database details on Server and Database Selection Screen
  • Enter SQL Database Server Name

You can specify the database name or leave it as default which will create a database by the name “aspnetdb”

https://howtodowithsharepoint.files.wordpress.com/2016/06/71.png?w=800

  • On the confirmation Page you can see the Database Server Name and Database Name as well that is going to be provisioned
  • Click Next

https://howtodowithsharepoint.files.wordpress.com/2016/06/81.png?w=800

This will provision the Membership Database to SQL Server

  • Click Finish on the completion screen

https://howtodowithsharepoint.files.wordpress.com/2016/06/91.png?w=800

Now in order to verify if Membership Database has been created successfully or not and to allow requirement permissions for SharePoint Admin account.

Note: Granting permission explicitly on “aspnetdb” is necessary for SharePoint Admin Account as this is just a SQL Server Database with SharePoint having no knowledge of it. So by default SharePoint Admin Account won’t be allowed to get access to this database.

  • Login into SQL Server 2014 Management Studio

https://howtodowithsharepoint.files.wordpress.com/2016/06/101.png?w=800

  • Expand the Database Node and see for “aspnetdb” database

https://howtodowithsharepoint.files.wordpress.com/2016/06/111.png?w=800

In order to grant permissions to the SharePoint Farm Account which is “Prashant\Administrator” in here following the steps below:

  • Expand the Security Node
  • Expand the Logins Node
  • Locate the account you want to grant permissions
  • Right Click it
  • Select Properties

https://howtodowithsharepoint.files.wordpress.com/2016/06/121.png?w=800

  • On the Account Properties Screen Select “User Mapping”

https://howtodowithsharepoint.files.wordpress.com/2016/06/131.png?w=800

  • Select the “aspnetdb” Database
  • Select “db_owner” Role
  • Click OK to save the changes to SQL Server

https://howtodowithsharepoint.files.wordpress.com/2016/06/141.png?w=800

With this, we are all done for this demo.

In this article, we have covered Step 1 & 2. We will look for Step 3 & 4 in an upcoming article on Configuring FBA for SharePoint as follows-SHAREPOINT 2016: FORMS BASED AUTHENTICATION – PART 2

Stay tuned.

Return to Top