SAML Single Sign-On (SSO) For Laravel Using ADFS As IDP
SAML Single Sign-On (SSO) For Laravel Using ADFS As IDP
Laravel SAML Single Sign-On (SSO) plugin gives the ability to enable SAML Single Sign-On for your laravel applications. Using Single Sign-On you can use only one password to access your laravel application and services. Our plugin is compatible with
all the SAML compliant Identity providers. Here we will go through a step-by-step guide to configure Single Sign-On (SSO) between Laravel and ADFS Apps considering ADFS Apps as IdP.
Pre-requisites : Download And Installation
Open a Command Prompt window and change the working directory to your Laravel app's main directory.
Enter the below command.
composer require miniorange/saml-laravel-free
Note: If you are using Laravel 5.4 or below, you will need to add the following value to the 'providers' array in your app.php file which can be found in the project\config folder :provider\ssoServiceProvider::class
(You can check your current Laravel version by using the command php artisan --version.)
After successful installation of package, go to your Laravel app in the browser and enter https://<your-host>/mo_admin in the address bar.
The package will start setting up your database for you and then redirect you to the admin registration page.
Register or log in with your account by clicking the Register button to configure the plugin.
After login, you will see the Service Provider Settings option, where you will get the service provider metadata. Keep the metadata handy as it will be required later to configure step 1.
Steps to configure ADFS Apps Single Sign-On (SSO) Login into Laravel
1. Configure ADFS Apps as Identity Provider
Configure ADFS as IdP
On ADFS, search for ADFS Management application.
In AD FS Management, select Relying Party Trust and click on Add Relying Party Trust.
Select Claims aware from the Relying Party Trust Wizard and click on Start button.
Select Data Source
In Select Data Source, select the data source for adding a relying party trust.
Navigate to Service Provider Metadataoption in the laravel SAML plugin to get the endpoints to configure Service Provider manually.
In Add Relying Party Trust Wizard select option Enter data about the relying party manually and click on Next.
Specify Display Name
Enter Display Name and Click Next.
Configure Certificate (Premium feature)
Download the certificate from Service Provider Metadata Tab.
Upload the certificate and click on Next.
Select Enable support for the SAML 2.0 WebSSO protocol option and enter ACS URLfrom the plugin's Service Provider Metadata Tab.
Click on Next.
In the Relying party trust identifier, add the SP-EntityID / Issuer from the plugin's Service Provider Metadata tab.
Choose Access Control Policy
Select Permit everyone as an Access Control Policy and click on Next.
Ready to Add Trust
In Ready to Add Trust click on Next and then Close.
Edit Claim Issuance Policy
In the list of Relying Party Trust, select the application you created and click on Edit Claim Issuance Policy.
In Issuance Transform Rule tab click on Add Rule button.
Choose Rule Type
Select Send LDAP Attributes as Claims and click on Next.
Configure Claim Rule
Add a Claim Rule Name and select the Attribute Store as required from the dropdown.
Under Mapping of LDAP Attributes to outgoing claim types, Select LDAP Attribute as E-Mail-Addresses and Outgoing Claim Type as Name ID.
Once you have configured the attributes, click on Finish.
After configuring ADFS as IDP, you will need the Federation Metadata to configure your Service Provider.
To get the ADFS Federation Metadata, you can use this URL https://< ADFS_Server_Name >/federationmetadata/2007-06/federationmetadata.xml
You have successfully configured ADFS as SAML IdP (Identity Provider) for achieving ADFS Single Sign-On (SSO) Login
2. Configure Laravel SAML plugin as Service Provider
Go to the miniOrange Laravel SAML 2.0 SSO plugin and click on Choose File button next to the Upload Meatadata option.
Select the metadata file which you will get from ADFS and click on Upload button.
Click on Test Configuration button to test whether the SAML Configuration you've done is correct. On successful test configuration, you will get the different user attributes returned by your identity Provider in a test configuration table.
3. SSO Options
Your users can initiate the Single Sign On flow by clicking on the Single Sign On button generated on your login page. If you do not have this page yet, run php artisan make:auth & php artisan migrate to generate the authentication module.
In this Guide, you have successfully configured ADFS Apps SAML Single Sign-On (ADFS Apps SSO Login) choosing ADFS Apps as IdP and Laravel as SP using miniOrange plugin-SAML Single Sign On – SSO Login. This solution ensures that you are ready to roll out secure access to your Laravel site using ADFS Apps login credentials within minutes.
If you dont hear from us within 24 hours, please feel free to send a follow up email to firstname.lastname@example.org
This privacy statement applies to miniorange websites describing how we handle the personal
When you visit any website, it may store or retrieve the information on your browser, mostly in the
form of the cookies. This information might be about you, your preferences or your device and is
mostly used to make the site work as you expect it to. The information does not directly identify
you, but it can give you a more personalized web experience.
Click on the category headings to check how we handle the cookies.
Strictly Necessary Cookies
Necessary cookies help make a website fully usable by enabling the basic functions like site
navigation, logging in, filling forms, etc. The cookies used for the functionality do not store any
personal identifiable information. However, some parts of the website will not work properly without
These cookies only collect aggregated information about the traffic of the website including -
visitors, sources, page clicks and views, etc. This allows us to know more about our most and least
popular pages along with users' interaction on the actionable elements and hence letting us improve
the performance of our website as well as our services.