- Moodle Saml Single Sign-On SSO
- Plugin Pricing
- Moodle Saml Single Sign-On SSO For WordPress
Moodle SAML Single Sign-On (SSO) using WordPress as IdP | WordPress SSO Login
Overview
Easily configure SAML Single Sign-On (SSO) for your Moodle site with WordPress Moodle plugin, enabling seamless integration between WordPress and Moodle. Our plugin is compatible with all the SAML compliant Identity providers. This step-by-step guide will walk you through configuring Single Sign-On (SSO) using our WordPress Moodle plugin, enabling WordPress to function as the Identity Provider (IdP) and Moodle as the Service Provider (SP).
Pre-requisites : Download And Installation
To configure WordPress as IdP with Moodle, you will need to install the miniOrange Moodle SAML 2.0 SSO plugin
Configuration Steps
1. Setup WordPress as IdP
Follow the steps below to configure WordPress as an Identity Provider:
Configure WordPress as IdP
- Open the Moodle site.
- Install and activate the miniOrange SAML SSO plugin, a robust WordPress Moodle SSO solution, on your Moodle site acting as the Service Provider.
- In the Plugins tab scroll to Service Provider Metadata section you can find the SP metadata such as SP Entity-ID and ACS (AssertionConsumerService) URL which are required to configure the Identity Provider.

Instructions:
- Free
- Premium
- Open the WordPress site.
- Install and activate the Login using WordPress Users ( WP as SAML IDP ) plugin on your WordPress site which is acting as Identity Provider.
- Go to the WordPress IDP plugin, 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 and paste the SP-EntityID from the Service Provider. |
ACS URL | Copy and paste the ACS URL from the Service Provider. |
NameID Format | urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress |
Assertion Signed | Checked |

- Click on the Save button to save your configurations.
- Go to the IDP Metadata tab. Here you can find information for configuring the Service Provider.
- You can also download the metadata XML file, by clicking on the download link.

- Open the WordPress site.
- Install and activate the Login using WordPress Users ( WP as SAML IDP ) plugin on your WordPress site which is acting as Identity Provider.
- Go to the WordPress IDP plugin 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 and paste the SP-EntityID from the Service Provider. |
ACS URL | Copy and paste the ACS URL from the Service Provider. |
Select Binding type (optional) | Select Use HTTP-Redirect Binding for SLO |
Single Logout URL (optional) | Enter Single Logout URL given in Service Provider. |
X.509 Certificate (optional) | Enter X.509 Certificate. |
NameID Format | urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress |
Response Signed | Checked if you want to sign the SAML Response |
Assertion Signed | Checked if you want to sign the SAML Response |
Encrypted Assertion | Checked if you want to encrypt the SAML Assertion |

- Click on the Save button to save your configurations.
Attribute Mapping (optional):
- Go to the Attribute/Role mapping tab and navigate to the Attribute mapping section.
- When the user performs SSO, the NameID value is sent to the Service
Provider. This value is
unique for every user.

- Click on the Save button to save your configuration.
User Attributes (optional):
- Go to the Attribute/Role mapping tab and navigate to User Attributes.
- These are user attributes that can be sent to Service Provider
(such as first_name and last_name). - You can add multiple attributes by click on "+" button.

- Click on the Save button to save your configurations.
Custom Attributes (optional):
- Go to the Attribute/Role mapping tab and navigate to Custom Attributes.
- These are extra static attributes that can be sent to Service Provider.
- You can add multiple attributes by click on "+" button.

- Click on the Save button to save your configurations.
Role Mapping (optional):
- Go to the Attribute/Role mapping tab and navigate to Role Mapping section.
- User groups are the collection of users having similar access roles and capabilities.
- To map the Roles in WordPress as user group, please enable this option.
- You can specify the attribute under which the groups will be passed to the Service Provider.

- Click on the Save button to save your configurations.
- Go to the IDP Metadata tab. Here you can find information for configuring the Service Provider.
- You can also download the metadata XML file, by clicking on the download link.

2. Configure Moodle as SP (Service Provider)
- Free
- Premium
In the miniOrange SAML SSO plugin, go to the Plugins tab. There are two ways to configure the plugin:
A. By uploading IDP metadata:
- Enter the IDP Name.
- In the Service Provider Setup section choose Metadata URL/XML from Select the Method dropdown.
- Copy and paste the IdP metadata URL or XML file in IDP Metadata URL/XML input field.
- Click on the Click here to Test the configuration.

B. Manual Configuration:
- Provide the required settings (i.e. IDP Name, IDP Entity-ID or Issuer, SAML Login URL, X.509 Certificate) as provided by your Identity Provider.
- Click on the Click here to Test the configuration.

Step 3: Attribute Mapping
- When the user performs SSO, the NameID value is sent by the Identity Provider. This value is unique for every user.
- For the plugin to access these attributes, assign the values for Username and Email as NameID.

In the miniOrange SAML SSO plugin, scroll down to the Service Provider Setup section of the plugin. There are two ways to configure the plugin:
A. By uploading IDP metadata:
- Provide any IDP Name. For example, my_IDP.
- Choose the value of Select the Method as Metadata URL/XML from dropdown.
- Enter the Metadata URL as
https://tenant-name.b2clogin.com/tenant-name.onmicrosoft.com/B2C_1A_signup_signin_saml/Samlp/metadata

Note: You will need to replace the tenant-name in above URl with Azure B2C tenant name.

- Scroll to the bottom and click on Save changes button.
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.
- Click on the Save changes button to save your configuration.

Step 3: Attribute Mapping
Basic Attribute Mapping
- When the user performs SSO, the NameID value is sent by the Identity Provider. This value is unique for every user.
- For the plugin to access these attribute assign the Email and Username attribute.
- Addtionally user attributes can be mapped (such as Firstname and Lastname).
- Click on the Save changes button to save your configuration.

Custom Attribute Mapping
This feature allows you to map custom attribute sent by the IDP to the Moodle attributes.
- To create a custom attribute, navigate to Site Administration >> Users >> User Profile Fields in the plugin.
- Click on Create a new profile field , select the type of attribute from dropdown and enter the values in required fields.

- Assign the desired value to the created custom attribute.

- Scroll down and click on the Save changes button to save your configurations.
Step 4: Role Mapping
- 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.
- Scroll down to Role Mapping section.
- Select the Default Role and click on the Save changes button to save your configuration.

Step 4: Role Mapping
This feature allows you to assign and manage roles of the users when they perform SSO. Along with the default Moodle roles, this is compatible with any custom roles as well.
- Group/Role attribute will provide a mapping for the field name which contains role-related information sent by the IDP and will be used for Role Mapping.
- Scroll to the Role Mapping section and provide the mappings for the respective roles.
- Select the Default Role from the dropdown if the user role doesn't match with the assigned values.
- For example, If you have a user whose Group/Role attribute value is idp-teacher and you want to assign it to the teacher group then, just provide idp-teacher in the Teacher: field of Role mapping section.

Note: You can assign multiple values separated with semi-colon(;).

- Click on the Save changes button to save your configurations.
Step 5: SSO Settings
- 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 enable the plugin visibility.
- Click on the ⬆ to set plugin preference.

Step 5: SSO settings
In the plugin you can add a login widget to enable SP-Initiated SSO on your site.
- Navigate to Site administrator >> Plugins >> Manage authentication.
- Click on the to enable the plugin visibility.
- Click on the ⬆ to set plugin preference.

- To enable auto-redirect from Moodle login page to WordPress site .
- Choose Yes value from the dropdown for Enable Auto-redirect to IDP from Moodle login page field.
- Note down Backdoor URL it will be useful when SSO fails.
- Click on the Save changes button to save your configuration.

You have successfully configured Moodle as SAML SP for achieving WordPress SSO login into your Moodle Site.
Related Articles
Why Our Customers choose miniOrange Moodle SAML Single Sign-On Solution?

24/7 Support
Get prompt support from our technical experts, accessible around the clock for direct assistance

Affordable Pricing
miniorange provides most affordable Secure Moodle Single Sign-on Solutions.

Documentation
Get access to our detailed knowledge base, which includes comprehensive guides and instructional videos.
We offer Secure Identity Solutions for Single Sign-On, Two Factor Authentication, Adaptive MFA, Provisioning, and much more. Please contact us at
+1 978 658 9387 (US) | +91 97178 45846 (India) samlsupport@xecurify.com