Search Results :

×

Moodle SAML Single Sign-On (SSO) Integration using Drupal as IDP


Drupal Moodle SSO Integration will allow you to configure Single Sign On ( SSO ) login between your Drupal site and Moodle. Moodle SSO integration with your Drupal site will help your users to login into Moodle using their Drupal credentials. This SSO setup will also help you to manage your users in one single place. We provides Drupal SAML IDP module which is compatible with Drupal 7, Drupal 8 as well as Drupal 9. Here we will go through a step-by-step guide to configure SAML IDP SSO login between Moodle as SP ( Service Provider ) and Drupal as IDP ( Identity Provider ). Follow the steps below to configure the Single Sign-On ( SSO ) into Drupal as IDP and Moodle as SP:

If you have any doubts or queries, you can contact us at drupalsupport@xecurify.com. We will help you to configure the module. If you want, we can also schedule an online meeting to help you configure the Drupal SAML IDP Single Sign on (SSO) module.


Pre-requisite: Download and Installation 


  • Download the module:
    composer require 'drupal/miniorange_saml_idp'
  • Navigate to Extend menu on your Drupal admin console and search for miniOrange SAML Identity Provider using the search box.
  • Enable the module by checking the checkbox and click on install button.
  • Configure the module at
    {BaseURL}/admin/config/people/miniorange_saml_idp/idp_setup
  • Install the module:
    drush en miniorange_saml_idp
  • Clear the cache:
     drush cr
  • Configure the module at
    {BaseURL}/admin/config/people/miniorange_saml_idp/idp_setup
  • Navigate to Extend menu on your Drupal admin console and click on Install new module button.
  • Install the Drupal SAML IDP 2.0 Single Sign On (SSO) - SAML Identity Provider module either by downloading the zip or from the URL of the package (tar/zip).
  • Click on Enable newly added modules.
  • Enable this module by checking the checkbox and click on install button.
  • Configure the module at
    {BaseURL}/admin/config/people/miniorange_saml_idp/idp_setup

Steps to configure Moodle Single Sign-On (SSO) Login into Drupal site

1. Configure Drupal as Identity Provider:

  • Go to Moodle site.
  • Install and activate the miniOrange SAML SP module on your Moodle site, which acts as a Service Provider.
  • Go to the miniOrange SAML SP module, navigate to the Service Provider Metadata tab. Here, you can find the Service Provider metadata such as SP Entity ID , ACS (Assertion Consumer Service) URL, Audience URI and NameID format which is required to configure the Identity Provider.
  • moodle SAML SP single sign on ( sso ) upload metadata

    miniorange img Instructions:

  • Go to Drupal site.
  • Install and activate the miniOrange SAML IDP module ( Drupal as SAML IDP ) on your Drupal site which is acts as an Identity Provider.
  • Go to the Drupal SAML IDP module, navigate to the Service Provider tab.
  • Enter the values corresponding to the information from the Service Provider. Refer to the table below.


  • Service Provider Name Name of your Service Provider.
    SP Entity ID or Issuer Copy the SP EntityID from the Service Provider Setup tab in miniorange SAML SP module from your moodle site.
    ACS URL Copy the ACS URL from the Service Provider Setup tab in miniorange SAML SP module from your moodle site.
    NameID Format urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
    Assertion Signed Checked

    drupal saml idp service provider
  • Click on the Save Configuration button to save your configurations.
  • Go to the IDP Metadata tab. Here you can find information for configuring the Service Provider ( SP ).
  • You can also download the metadata XML file, by clicking on the Download XML Metadata button.
  • Drupal saml idp upload metadata

2. Configuring Moodle as Service Provider:

We will go through the steps to setup Moodle as a Service Provider ( SP ). Here, we will be adding the IdP metadata to configure the module.

In the miniOrange SAML SP module, go to the Service Provider tab of the module. There are two ways to configure the module:

A. By uploading IDP metadata:

  • Click on Upload IDP metadata button.
  • Enter the Identity Provider Name
  • You can copy and paste IdP metadata XML file download in the last step and click on Upload Metadata button or use a metadata URL copied in the last step and click on Fetch Metadata.
  • moodle saml SSO upload metadata

B.Manual Configuration:

  • Provide the required settings ( i.e. Identity Provider Name, IdP Entity ID or Issuer, SAML Login URL, X.509 Certificate ) as provided by your Identity Provider as shown in the last step.
  • Click on the Save Configuration button to save your configuration.
  • moodle saml SP upload metadata

3. Moodle User Mapping:

There are two features include in Moodle:

  1. Attribute Mapping
  2. Role Mapping

User Attribute Mapping in Moodle SAML SP module:

  • When the user performs SSO, the NameID value is sent by the Identity Provider ( IDP ). This value is unique for every user.
  • To assign by which attribute value user should be created or authenticate himself. for that select Email or Username in "Login/Create Moodle account by" dropdown.
  • For the module to access these attributes assign the Email and Username attribute in the required field.
  • Click on the Save configuration button to save your configuration.
  • moodle sso integration saml attribute mapping

User Role Mapping in Moodle SAML SP module:

  • In the free plugin, you can choose a default role that will be assigned to all the non-admin users when they perform SSO. [NOTE: Roles will be assigned to new users created by SSO. Existing Moodle users’ roles will not be affected.]
  • Go to Attribute/Role mapping tab and navigate to Role Mapping section.
  • Select the Default Role and click on the Save button to save your configuration.
  • moodle sso saml role mapping

4. SSO Settings in Moodle:

  • In the plugin you can add a login widget to enable SP-initiated SSO on your site.
  • Go to the plugins >> Authentication >> Manage authentication.
  • Click on the to enble the plugin visibility.
  • Click on the ⬆ to set plugin preference.
  • moodle sso connect saml role mapping

24*7 Active Support:

If you face any issues or if you have any questions, please feel free to reach out to us at drupalsupport@xecurify.com. In case you want some additional features to be included in the module, please get in touch with us, and we can get that custom-made for you. Also, If you want, we can also schedule an online meeting to help you configure the Drupal SAML IDP SSO Login module.

Free Trial:

If you would like to test out the module to ensure your business use case is fulfilled, we do provide a 7-day trial. Please drop us an email at drupalsupport@xecurify.com requesting a trial. You can create an account with us using this link.

Additional Resources

Our Other modules:

Hello there!

Need Help? We are right here!

support
Contact miniOrange Support
success

Thanks for your inquiry.

If you dont hear from us within 24 hours, please feel free to send a follow up email to info@xecurify.com