SAML Enrolments

Enrolment ::: enrol_saml
Maintained by Sixto Martin Garcia
SAML Enrol plugin based on the simplesamlphp software. (require Authentication SAML and simpleSAMLphp SP)
Latest release:
126 sites
10 fans
Current versions available: 4

SAML Enrollments for Moodle.

SAML for Moodle is an open-source implementation for federated identity-based authentication infrastructure based on Security Assertion Markup Language (SAML) that allows the Moodle users log in through simpleSAMLphp.


Donations are welcome to support the development of the plugin.

Moodle's SAML PluginMoodle's SAML Plugin


This plugin require a simplesamlphp instance configured as SP

Install Instruction

  1. Unpack this saml directory into the /enrol/ directory as you would for any Moodle enrol module (

  2. Login to Moodle as an administrator, and activate the module by navigating Site administration>Plugins>Enrolments>Manage enrol plugins->SAML enrolments


  • Add instance to new courses: True
  • Enable saml enrolments: Enable True
  • Default enrolment period: 0
  • Default role. (Usually student)


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3


Sixto Martin Garcia (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS


  • Wed, Mar 20, 2013, 6:48 PM
    Hi Sixto, what would be the way to unroll a user created by means this plugin via SAML Authentication on Moodle 2.4?

    Thanks in advance
  • Wed, Mar 20, 2013, 7:10 PM
    Hi @Miguel.

    The way is to set with the 'inactive' flag in the IdP the shacUserStatus related with this course and set active the "supportcourses" and set to False the "ignoreinactivecourses" param in the auth saml plugin.

    There is a risky process that you could implement in the enrol/saml/lib.php, function sync_user_enrolments
    There you can override the funcions and disable always unenroll the user in the course if not appear in the schacUserStatus
  • Fri, Mar 14, 2014, 1:25 AM
    Does it exist a way to use the plugin to assign a user role for all courses under a specific courses categorie ?

    Briefly, if a user have a value sended under a specific SAML attribute that correspond to a specific Moodle role, enroll it under all course of a specific category with this role...

    I'm a beginner with moodle, so maybe I just need a few hints...

    Thank's a lot !

  • Tue, Jul 21, 2015, 12:56 AM
    I deployed a new version compatible with Moodle 2.9.

    I'm also looking for some help. Donations or contributions to the code are always welcome to keep this plugin alive.
Please login to post comments