Moodle integrations: syncing your SIS, HR or CRM with Moodle

How to connect a student system, HR platform or CRM to Moodle in 2026: what core already does, when a custom plugin is worth it, what it costs, and the mistakes that break enrolments.

Drawing of a small school building and an office block joined by a blue pipe with arrows both ways, a person in the middle tightening a joint with a spanner.

Short answer: most Moodle integrations do not need custom code at first. If your student system, HR platform or CRM can write to a database table or drop a CSV file, Moodle’s core enrolment plugins can read it on a schedule. You need a custom plugin when the other system only speaks its own API, when data has to flow back out of Moodle, or when the rules are more than “this person is in this course”.

This guide is for the person who has been asked to “connect Moodle to the SIS” and has to decide how. We build these integrations, so we have a stake in the answer. Everything about core below can be checked in Moodle’s own source.

What can Moodle do without a plugin?

Moodle 5.3 ships with several ways to pull people and enrolments in from another system.1 They differ in one thing: where Moodle reads the data from.

Core optionMoodle reads fromGood forLimits
External database enrolment (enrol_database)A table or view in the other system’s databaseSIS enrolments, each termRead only. Moodle never writes back. Needs network access to that database
External database authentication (auth_db)A user tableAccounts and passwords kept in the other systemAccounts only, no enrolments
Flat file (CSV) enrolment (enrol_flatfile)A CSV file on the serverSystems that can only export filesAdmins hear about problems only if “Notify administrator” is on; file permissions must be right
IMS Enterprise file (enrol_imsenterprise)An XML file in the IMS Enterprise formatOlder SIS products that export itAn old standard; few systems still produce it cleanly
LDAP enrolment (enrol_ldap) and LDAP authenticationYour directoryStaff and students who already live in Active DirectoryOnly as good as your group structure
Upload users (admin tool)A CSV someone uploadsOne-off loads, small schoolsManual, so it drifts

The external database, flat file, IMS Enterprise and LDAP plugins each come with a scheduled task, so once they are set up, enrolments follow the other system without anyone touching Moodle.1 One catch: in the 5.3 source, the sync tasks for external database enrolment, external database authentication and both LDAP plugins ship disabled. Enable them under Site administration, Server, Scheduled tasks, or nothing syncs after the first manual run.

If your SIS can expose a view with three columns, a user ID, a course ID and a role, start with external database enrolment. It is free, already installed and maintained by Moodle HQ. Most of the work is agreeing on the IDs, which is the next section.

The question that decides everything: which ID is the key?

The most common way a sync goes wrong has nothing to do with code. The two systems do not agree on how to identify a person or a course.

Moodle matches users on a field you choose: idnumber, username or email. It matches courses on idnumber, shortname or the internal id. Choose fields that:

  • never change. Email addresses change, for example when an institution moves to a new domain. A student number does not.
  • are unique in both systems. Duplicate course short names across terms are common, and the sync will enrol people in the wrong one.
  • are filled in for every record. A course with an empty idnumber is a course the sync silently skips.

Settle this before anyone writes code or configures a plugin. It is a spreadsheet exercise, and it saves weeks.

When do you need a custom integration?

Core covers “pull from a table or file, on a schedule”. Anything else needs code. The usual cases:

  1. The other system only has an API. Many hosted SIS, HR and CRM products do not give you database access, only a REST API with their own login. Someone has to call that API and turn the answers into Moodle enrolments. That is a scheduled task in a small local plugin.
  2. Data has to go back out. Grades to the SIS at the end of term, completions to the HR system for compliance, “course purchased” or “certificate issued” to the CRM. Core enrolment plugins never write to the other side.
  3. It has to happen now, not on the next cron run. A new hire should be in induction the day they start. That means the other system calls Moodle (a web service), or Moodle reacts to its own events and calls the other system.
  4. The rules are not one to one. “Everyone in department X, except contractors, goes into these three courses, and leaves them 30 days after their end date.” A SQL view can do some of this. Past a point, the logic belongs in tested PHP.
  5. More than one source. Students from the SIS, staff from HR, short course buyers from the shop. Each source needs to own its own enrolments and not remove the others’.

Which Moodle APIs does a custom integration use?

For anyone reviewing a quote, these are the pieces you should expect to see named:

  • Web services, for the other system to call Moodle. Core already has functions such as core_user_create_users, core_user_update_users, enrol_manual_enrol_users, core_cohort_add_cohort_members and core_course_create_courses.2 Often no new function is needed, only a well-scoped token.
  • Events and observers, for Moodle to tell the other system something happened: a course completed, a grade changed, a user enrolled.
  • Scheduled and ad hoc tasks, for polling an outside API and for retries when it is down.
  • An enrolment plugin, when the integration should own its enrolments, so that an admin can see where each enrolment came from and the sync never touches manual ones.
  • The new REST API in Moodle 5.3, with OAuth 2 and personal access tokens. It is the future, but in 5.3 it covers only a few parts of Moodle, so most integrations today still use the classic web services.3

If a developer’s plan says “we will write directly to the Moodle database”, walk away. It skips the events, the caches and the permission checks, and it breaks on upgrade.

How do you keep an integration from becoming a security hole?

An integration usually holds the most powerful credential on your site. Three rules:

  • A dedicated Moodle user for the integration, with a role that has only the capabilities it needs. Never a site admin’s token.
  • A custom external service that lists only the functions the integration calls, and a token restricted by IP address and with an expiry date.
  • Logs on both sides. Each run should record what it created, changed and skipped, so that when a student says “I’m not in my course”, someone can answer in five minutes.

Moodle 5.3.1, released on 12 November 2026, now notifies a user when a personal access token is created on their account and notifies admins when an OAuth 2 client secret is created (MDL-89760).4 Make sure those notifications reach a person who reads them. An unexpected token is how you notice a compromised integration.

What does a Moodle integration cost?

Our published price for a web service or outside integration plugin starts at $280, is typically $390, and runs to about $1,150 for larger builds, with typical delivery in five days.5 The final price depends on the written scope. You can get a fixed quote in a few minutes.

The price is rarely the expensive part. The expensive part is an integration that half works: enrolments that go missing a week into term, grades that reach the SIS twice. So whoever builds it, ask for:

  • tests that run the sync against fake data from the other system, including the bad rows
  • a dry run mode that reports what it would change before it changes anything
  • a written list of which system owns which field
  • a plan for the next Moodle upgrade

A plan you can follow this week

  1. List every system that should feed Moodle or receive data from it, and which direction each one goes.
  2. Pick the keys for users and courses, and check that they are filled in on both sides.
  3. Try core first. If one of those systems can expose a view or a CSV, set up external database or flat file enrolment on a test site and run it against a copy of real data.
  4. Write down what core can’t do. That list, not “integrate Moodle with X”, is the scope for a custom plugin.
  5. Get a fixed price for that scope, with tests and a dry run included.

We describe the kinds of syncs we build in our integrations section. If you are still deciding whether to hire at all, our hiring guide has the questions to ask any developer, and How to automate Moodle covers the cases where a workflow tool is enough.

Sources

  1. Moodle source, MOODLE_503_STABLE: public/enrol and public/auth, including each plugin’s db/tasks.php and enrol/database/settings.php. Checked 18 November 2026 on a 5.3+ build. ↑ ↑

  2. Moodle source, public/lib/db/services.php and public/enrol/manual/db/services.php. ↑

  3. MoodleDocs, REST API tokens (5.3): “In Moodle 5.3, only a few parts of Moodle are available through the REST API.” See also our Moodle 5.3 review. ↑

  4. Moodle developer docs, Moodle 5.3.1 release notes, 12 November 2026, and tracker issue MDL-89760. ↑

  5. DevLMS, How much does a custom Moodle plugin cost?, row “Web service or outside integration”. ↑

Need a Moodle plugin built or rescued?

Tell the scoping assistant what you need. You get a fixed price and a timeline in a few minutes, and an engineer reviews it within one business day.

Get a fixed quote