Search Results :

×

Moodle SAML Single Sign-On (SSO) Integration with Drupal as IdP

This guide will help you integrate Drupal as a SAML 2.0 Identity Provider (IdP) and Moodle as a Service Provider (SP) using the miniOrange SAML IDP module. This integration enables centralized user management and permission control, allowing users to access multiple applications with a single set of credentials. The module is compatible with Drupal 7, Drupal 8, Drupal 9, Drupal 10, and Drupal 11.

  • 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
  • Download the plugin from the Moodle Plugin Directory and install it in the Moodle referring to the steps below:
    • Login as administrator in Moodle.
    • Navigate to the Site Administrator → Plugins → Install plugins. In Plugin installer → beside the ZIP package → click on Choose a file.
    • A File Picker window will appear on the left side. Select Upload a file and then click on the Choose File button. (upload the zip file that you downloaded from the Moodle Plugins Directory)
    • Click on the Upload this File button.
  • Click the Install the plugin from the ZIP file button and then click on the Continue button to proceed.
  • Click on the Upgrade Moodle database now button, and then click on the Continue button.
  • Go to Configuration → People → Drupal SAML IDP Configuration in the Administration menu. (/admin/config/people/miniorange_saml_idp/customer_setup)
Drupal-SAML-IDP-Configuration
  • Under the IDP Metadata tab, copy Metadata URL and keep it handy. (This is required to configure SP.)
Moodle-Single-Sign-On-Administration-Plugins-overview-click-on-Settings
  • Log in to your Moodle administrator account.
  • Navigate to the Site administrator → Plugins..
Moodle-Single-Sign-On-Administration-Plugins-overview-click-on-Settings
  • Under the Service Provider Metadata tab click on the Download Service ProviderMetadata link to download the XML metadata file. Keep it handy. This is required to configure Drupal as a SAML Identity Provider (IdP).
Moodle-SAML-Single-Sign-On-click-on-download-metadata
  • Scroll down to the Service Provider Setup tab of the plugin.
  • Enter the Identity Provider Name. Paste the previously copied IdP metadata URL from Drupal into the IDP Metadata URL/XML text field.
  • Click on the Save changes button.
Moodle-SAML-Single-Sign-on-paste-the-IdP-metadata-file-in-the-field
  • Navigate to the Drupal site. Go to the Identity Provider Setup tab of the module and click on the Upload SP Metadata.
  • In the Upload Metadata File field, choose the SP metadata file that you downloaded from Moodle and click on the Upload button.
Drupal-SAML-IDP-Upload-Metadata

    You have successfully configured the SAML SSO between Moodle as SAML SP and Drupal as SAML IDP.

  • Go to the Mapping tab of the module.
  • Scroll down to the Basic Attribute Mapping section and enter the Attribute Name and Attribute Value in their respective text fields.
  • Once done, click the Save Configuration button.
Drupal-SAML-IDP-Moodle-Attribute-Mapping
  • Navigate to your Moodle site.
  • In the Moodle dashboard → Site administration → Plugins.
  • Scroll down to the Attribute Mapping section.
  • To allow the plugin to access user details, assign the Email and Username attributes. You can also map other attributes like Firstname and Lastname. Click the Save changes button to save your settings.
  • When a user performs SSO, the Identity Provider sends a unique NameID value that identifies the user.
Drupal-SAML-IDP-Moodle-Attribute-Mapping
  • Scroll down to the the Test Configuration and click the Click here link.
Moodle-SAML-Single-Sign-on-click-on-test-configuration-button
  • On a Test Configuration popup, sign in with Drupal site credentials (if the user session does not exist). After successful authentication, the list of attributes received from the Drupal site will be displayed.
  • Click on the Done button.
Moodle-test-configuration-window-received-attribute-from-the-Drupal
  • To Perform SP-Initiated SSO on your site:
    • Open an incognito or private window and log in to your Moodle site.
    • Click the SSO-initiated link. (Login with Drupal)
Drupal-SAML-IDP-SSO-connection

    Moodle is successfully configured as a SAML SP for Drupal SSO login

Explore the advanced features offered by the module with full-featured trial. You can initiate the trial request using Request 7-day trial button of the module or reach out to us at drupalsupport@xecurify.com for one-on-one assistance from Drupal expert.

ADFS_sso ×
Hello there!

Need Help? We are right here!

support