SAML Authentication Implementation in Laravel

Ravi Kukkadapu 1 Reputation point
2020-12-15T17:18:12.757+00:00

SAML Authentication Implementation in Laravel 5.3

Unable to Integrate the SAML in laravel

Error : Getting redirection problem, Modules not including to the project

Microsoft Security Microsoft Entra Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. Marilee Turscak-MSFT 37,206 Reputation points Microsoft Employee Moderator
    2020-12-15T23:36:00.563+00:00

    What is the exact error you are seeing and the guide you are following? There are some solutions for redirect problems posted here and here but without further explanation I won't be able to tell if it's the same issue you are having. Do you get the redirection at login or at some other point?

    Laravel is a PHP framework and there are some plugins that exist for Azure AD Integration with Laravel. You need to register an app in AAD and build out the app. Microsoft has a tutorial for building PHP apps with Microsoft Graph that has the Azure AD authentication built in: https://learn.microsoft.com/en-us/graph/tutorials/php

    Please also look through the answers on Q&A and Stack Overflow to see if you are missing anything in the steps.

    There is an existing repository that can be used for AAD integration with Laravel via SAML (external though):
    https://github.com/aacotroneo/laravel-saml2

    Santosh Kumar created a step-by-step walk through on stack overflow:

    On the Azure side:

    a) Go to Azure Active Directory and then Enterprise Application

    b) Add New Application and choose Non-gallery Application

    c) Click Set up single sign on and then click on SAML Box

    d) Edit the basic SAML configuration and add the following

    Identifier (Entity ID) - https://my-laravel-website.com/saml2/aad/metadata

    Reply URL (Assertion Consumer Service URL) - https://my-laravel-website.com/saml2/aad/acs

    e) Download Federation Metadata XML from SAML Signing Certificate section, on your system

    f) Next assign users to your current SAML SSO project.

    Note - If there is no user in your account you need to create one and assign some role.
    https://www.youtube.com/watch?v=xn_8Fm7S7y8

    Then follow the rest of the guide to install the Laravel package: https://stackoverflow.com/questions/54289010/azure-active-directory-sso-with-laravel

    If you are having trouble feel free to email me at AzCommunity@microsoft.com ("Attn: Marilee Turscak") and include your full error message.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.