diff --git a/lang/en/auth_ldap_syncplus.php b/lang/en/auth_ldap_syncplus.php
index 13f5e12e78beeef0689b60f4c53c633a7c94bf2d..87f2f0f9931a930a4691cb53352b2f9835e42696 100644
--- a/lang/en/auth_ldap_syncplus.php
+++ b/lang/en/auth_ldap_syncplus.php
@@ -39,3 +39,5 @@ $string['syncroles'] = 'LDAP roles sync job (Sync Plus)';
 $string['synctask'] = 'LDAP users sync job (Sync Plus)';
 $string['userentriestosuspend'] = 'User entries to be suspended: {$a}';
 $string['waitinginremovalqueue'] = 'Waiting in removal queue for {$a->days} day grace period: {$a->name} ID {$a->id}';
+$string['ad_accountexpires_key'] = 'AD account expires';
+$string['ad_accountexpires_desc'] = 'If set to yes and the auth provider is Active Directory the attribute accountExpires is evaluated and taken into account.';
diff --git a/settings.php b/settings.php
index 7dff891f2067d3bf8993f841a2bf96b2075fde46..7f789714b3a467ab1e6981603404afd98a0c185d 100644
--- a/settings.php
+++ b/settings.php
@@ -293,6 +293,11 @@ if ($ADMIN->fulltree) {
                 get_string('removeuser_graceperiod', 'auth_ldap_syncplus'),
                 get_string('removeuser_graceperiod_desc', 'auth_ldap_syncplus'), 10, PARAM_INT));
 
+        // Account Expiration.
+        $settings->add(new admin_setting_configselect('auth_ldap_syncplus/ad_accountexpires',
+                new lang_string('ad_accountexpires_key', 'auth_ldap_syncplus'),
+                new lang_string('ad_accountexpires_desc', 'auth_ldap_syncplus'), 0 , $yesno));
+
         // Create users.
         $settings->add(new admin_setting_configselect('auth_ldap_syncplus/sync_script_createuser_enabled',
                 new lang_string('sync_script_createuser_enabled_key', 'auth_ldap_syncplus'),