Moodle SAML Single Sign-On (SSO) Integration with Drupal as IdP
Overview
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.
Installation Steps
- Using Composer
- Using Drush
- Manual Installation
Prerequisite:
- 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.
Configuration Steps
Drupal SAML IDP Metadata:
- Go to Configuration → People → miniOrange SAML IDP Configuration in the Administration menu. (/admin/config/people/miniorange_saml_idp/sp_setup)
- Under the IDP Metadata tab, click the Download Metadata button to download the IdP metadata file. (This is required to configure SP.)
Configure SAML SSO Application in Moodle LMS (E-learning):
- Log in to your Moodle administrator account.
- Navigate to the Site administrator → Plugins → Plugins overview → Additional plugins.
- Click on the Settings link under Actions.
- Under the Service Provider Metadata tab click on the DOWNLOAD link to download the XML metadata file. Keep it handy. This is required to configure Drupal as a SAML Identity Provider (IdP).
- Go to the Service Provider Setup tab of the plugin and click on the Upload IdP Metadata button.
- Enter the Identity Provider Name. Paste the previously copied IdP metadata file from Drupal into the IdP Metadata XML text field and click on the Upload Metadata button.
Configuring Drupal as SAML Identity Provider (IdP):
- Navigate to the Drupal site. Go to the Service Provider Setup tab of the module and click on the Upload SP Metadata.
- In the Upload Metadata field, choose the SP metadata file that you downloaded from Moodle and click on the Upload button.
You have successfully configured the SAML SSO between Nextcloud as SAML SP and Drupal as SAML IDP.
Test Connection between Moodle and Drupal:
- Navigate to your Moodle site.
- In the Moodle dashboard → Site administration → Plugins → Plugins Overview → Additional plugins → Settings.
- Go to the plugin's Service Provider Setup tab. Scroll down and click on the 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.
Related Articles
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.
[MO_CONTACT_US]