LearnDash Integration

Introduction

LearnDash is most likely the most powerful learning management system for WordPress and many customers have requested some light-weight integration between WPO365 and LearnDash.

What to expect

With LearnDash content managers can create engaging courses with just a few clicks. Once a course is online, users can take that course. Whether they need to register (and pay) is up to you. But if you require users to register, then all of a sudden, WPO365 may be able to help! If you use WPO365 to enable Sign in with Microsoft for your WordPress website, then WPO365 is able to:

  • Dynamically enroll a new user who just successfully signed in with Microsoft onto one or more default courses and or add that user to one or more default LearnDash User Groups.
  • Dynamically enroll a user who just successfully signed in with Microsoft onto one or more courses or add that user to one or more LearnDash User Groups based on their Entra ID group membership(s).

Before you start

  • You have reviewed the installation prerequisites and have installed and activated the WPO365 | LOGIN plugin (see Getting started - Installation).
  • You have also configured Microsoft (OpenID Connect or SAML 2.0) based Single Sign-on .
  • To add support for the LearnDash integration, you must have at least purchased any of the following premium plugins WPO365 | ROLES + ACCESS, WPO365 | PROFESSIONAL or WPO365 | INTEGRATE
  • You are a Global Administrator for your company’s Microsoft 365 tenant / Azure AD B2C directory (or you have at least obtained approval for your plans from your company's Global Administrator ).
  • You are an Administrator for your WordPress website.
  • Your website uses SSL and the internet address starts with https://.

OpenID Connect based Single Sign-on

Proceed as follows to navigate to the application that you registered in Entra ID when you configured OpenID Connect based Single Sign-on. If you configured SAML 2.0 instead, then scroll down to the blue box below this section.

  • Go to the plugin's Single Sign-on page and click on the View in Entra Portal link for the Application (client) ID.
  • Sign into Entra Portal and ensure that you have landed on the Overview page of the App registration that you created when you registered your WordPress application in Entra ID.

  • Locate the link in the Essentials section for Managed application in local directory. Clicking it will take you to the Enterprise Application instance of your App Registration.
  • Continue to Manage > Single Sign-on, then click Attributes & Claims > Edit. Select + Add a group claim > All groups. Ensure Group ID for Source ID is selected. Click Save to add the claim.

Alternatively, you can configure the integration with Microsoft 365 services and Microsoft Graph, so the plugin can retrieve a list of group memberships for the logged-in user. Verify the necessary steps to enable the integration with Microsoft 365 services. If you opt for this option to obtain a list of group memberships, then you must ensure that sufficient permissions have been granted to the registered application in Entra ID. To do so, please follow the steps below.

  • Navigate to the API Permissions page of your App registration.
  • Click + Add a permission > Microsoft Graph > Application permissions and search for GroupMember.Read.All.

  • Repeat the previous step for the User.Read.All permission.
  • Click Add permission to close the panel and return to the overview of Configured permissions.
  • Finally, click Grant admin consent for ...

Please note In this step you are adding Application permissions. Alternatively, you can add the same permissions as Delegated permissions. However, in that case the LearnDash mapping rules are only applied when a user signs in with Microsoft interactively. The rules won't be applied - for example - when you are synchronizing users regular using WPO365's User synchronization feature.

SAML 2.0 based Single Sign-on

The two options below explain how you can ensure that the WPO365 plugin is able to retrieve a list of Entra ID group IDs, which are necessary if you wish to dynamically assign LearnDash courses and groups to users based on their Entra ID group membership(s).

  1. Recommended Navigate to the Enterprise Application that you created for SAML based SSO in Entra ID. Continue to Manage > Single Sign-on, then click Attributes & Claims > Edit. Select + Add a group claim > All groups. Ensure Group ID for Source ID is selected. Click Save to add the claim.
  2. Alternative Configured the integration with Microsoft 365 services and Microsoft Graph, so the plugin can retrieve a list of group memberships for the logged-in user. Verify the necessary steps to enable the integration with Microsoft 365 services.

With either solution, the plugin will be able to read the list of group (IDs) that the logged-in user is a member of, and use that information to dynamically assign LearDash courses.

Plugin configuration

To verify that you are ready to configure rules that would dynamically assign (new) users to LearnDash courses or groups based on Entra ID group membership(s), please proceed as follows.

  • Navigate to WP Admin > WPO365 > Plugin self-test.
  • Click Start self-test.
  • Use a Microsoft 365 / Entra ID account to sign in with Microsoft when asked to do so.
  • When the test completes, scroll down to the ROLES + ACCESS / AUDIENCES section and verify that at least one of the test cases for either delegated permissions or application permissions (recommended) has passed. Please note, that you can also view the list with Entra ID group IDs for that specific user, when you click the view link.

Once you confirmed that WPO365 can retrieve the Entra ID groups that a user is a member of, you can proceed to configuring LearnDash course and User Group assignments.

  • Go to WP Admin > WPO365 > User registration and scroll to the section LearnDash Integration.
  • In this section, you have 4 type of assignments that you can configure.

Entra ID Group based LD course assignments

This is where you configure the auto-assignments of users to LearnDash Courses based on Entra ID groups. First you should enter the Object ID of the Entra ID group in the text field (see below for instructions how you can find this Object ID). Then you can pick a LearnDash Course from the dropdown. The number in front of the course title is the course ID.

Entra ID Group based LD group assignments

To assign a user to a LearnDash User Group works similar and you should first enter the Object ID of the Entra ID group in the text field and then pick a LearnDash User Group from the dropdown. The number in front of the user group's name is the LearnDash User Group ID.


Tip To find the Object ID of any Entra ID group, navigate to Entra Portal > Entra ID > Groups. Here you will find all Entra ID groups that have been created for your organization. On the overview page of each group, you'll find the group's Object ID.

Default course assignment for new users

WPO365 can also enroll users that sign in with Microsoft onto default courses or groups; Independent of Entra ID group membership(s). And it can do so in two different ways, controlled by the assignment scope.

  • New Users The rules defined below will only be applied to users that sign in with Microsoft for the first time. This is a great opportunity - for example - to assign new users to an introductory HR course.
  • All Users The rules defined below will be applied to all users that sign in with Microsoft.

Default course assignments for new users

It is also possible to assign any new user who signs in with Microsoft to a LearnDash Course. In this case, the Entra ID group(s) that the user is a member of, do not play any role.

Default group assignments for new users

It is also possible to assign a new user to a LearnDash User Group, without considering the Entra ID groups that the user possibly is a member of. 

Please don't forget to save your configuration, once you created your LearnDash assignments (or updated them).

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us