Integrate Moodle with Okta

Enable provisioning for the Moodle app instance to integrate with Okta.

Before you begin

  • You have a Moodle version 5.2 or later.
  • You have a Moodle account with admin privileges.
  • You enabled web services. In Moodle, go to Site Administration > Advanced Features > Enable web services and enable the setting.
  • You enabled the REST protocol. In Moodle, go to Site Administration > Plugins > Web services > Manage protocols and enable REST.
  • You created an external service and added the following web service functions:
    • core_group_add_group_members
    • core_group_create_groups
    • core_group_delete_group_members
    • core_group_delete_groups
    • core_group_get_course_groups
    • core_group_get_group_members
    • core_group_get_groups
    • core_group_get_groups_for_selector
    • core_group_update_groups
    • core_user_create_users
    • core_user_get_course_user_profiles
    • core_user_get_users
    • core_user_get_users_by_field
    • core_user_update_users
    • enrol_manual_enrol_users
  • You generated an API token for the admin user. In Moodle, go to Site Administration > Plugins > Web services > Manage tokens. Ensure that the token is generated for the same admin user authorized in the external service. Using a token for a different user can cause permission errors during provisioning operations, even if the credentials test passes successfully in Okta.
  • You have permission to manage apps in Okta.
  1. In the Admin Console, go to Applications > Applications.
  2. Click Browse App Catalog.
  3. Search for and select Moodle, and then click Add Integration.
  4. In General Settings, enter your Application label, Domain, and CourseId.
    • Application label: Enter a display name for the app (default: Moodle).
    • Domain: Enter your Moodle instance subdomain; for example, if your Moodle URL is yourcompany.moodlecloud.com, enter yourcompany.
    • CourseId: Enter the ID of the Moodle course to associate with pushed groups, found as the integer after ?id= in the course URL; for example, if the URL is yourcompany.moodlecloud.com/course/view.php?id=2, enter 2.
  5. Optional. Check Do not display application icon to users if you do not want the app icon to appear on the user home page.
  6. Click Done.
  7. Go to the Provisioning tab, click Integration, and then click Configure API Integration.
  8. Select Enable API Integration.
  9. Enter your API token in the Token field.
  10. Optional. Check Import Groups if you want Moodle groups to be imported into Okta.
  11. Click Test API Credentials.
  12. When the authorization process is complete, click Save.
  13. Select To App under Settings. Click Edit, and then select the provisioning features that you want to enable.
Moodle supported features