ADFS is the one of the great feature and will cover how it is working in upcoming articles. Will see the installation and configuration in this article.
Okay., lets begin,
How to install ADFS with built-in Databases and configure has been explained in the article. Here we will see how to configure how to add SQL Databases for ADFS instead of Local ADFS DB which will get installed during the ADFS Configurations.
ADFS with SQL Databases will give you additional features like,
1. Support for large organizations with more than 100 Relay party trust relationships.
2. Support for token replay detection.
3. Support for SQL AlwaysON, Mirroring, Failover Clustering, Reporting and Management tools benefits.
Import the ADFS Certificates and Display Name
Specify the SQL ADFS Primary Server and Click,
You also can specify the Database instance if you already created. But always recommended to let it create automatically
Review and Click Next
Click Configure once all the prerequisite checks passed sucessfully
Click close post ADFS configured without any errors
You could check ADFS Console is getting open without any issues and certificates are also configured properly
You are getting IDPInitiatedsignon also working and able to sign on as well.
Primary SQL Server, You could see that ADFS Databases are created. You could see that there are two Databases are available called AdfsArtifaceStore and AdfsConfiguration.
which shows that there is no Mirror is not yet configured. Only one server is taking care about ADFS Databases.
To configured the Mirror Databases, Take complete backup of both the databases and restore it in Second Server and create the Mirror.
Post Mirror Databases are created, Go ahead and run the below commands in Powershell
1. To configure AdfsConfiguraion database,
$temp= Get-WMIObject -namespace root/ADFS -class SecurityTokenService
$temp.ConfigurationdatabaseConnectionstring=”Data Source=Primaryservername; Failover Partner=MirrorSQLServerName;Initial Catalog=AdfsConfiguration;Integrated Security=true”
2. To Configure Adfs Artifactdbconnection
Set-adfsproperties –artifactdbconnection ”Data Source=PeimaryqlServerName; Failover Partner=MirrorSQLServerName;Initial Catalog=AdfsArtifactStore;Integrated Security=true”
That is it!!. You have configured ADFS with SQL Mirror with two servers. Now you can see that ADFS console is working fine if you failover to Second Server.