diff --git a/contrib/openldap/core-fd.schema b/contrib/openldap/core-fd.schema
index f7c7ea36371d4704919b9bdb7e9cfd336907f9eb..0ffe82de9bc8ffc52fb4b1ace4924175cf67e526 100644
--- a/contrib/openldap/core-fd.schema
+++ b/contrib/openldap/core-fd.schema
@@ -307,8 +307,7 @@ attributetype ( 1.3.6.1.4.1.38414.62.1.56 NAME 'fdTasksGranularMailBCC'
 attributetype ( 1.3.6.1.4.1.38414.62.1.26 NAME 'fdTasksGranularRef'
   DESC 'Fusion Directory - Reference towards a CN (E.g Mail Template)'
   EQUALITY caseExactMatch
-  SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
-  SINGLE-VALUE )
+  SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
 
 ## Any tasks requiring to store DN (Such as lifeCycle). ##
 
diff --git a/plugins/configuration/tasks/class_tasks.inc b/plugins/configuration/tasks/class_tasks.inc
index f692dce0a8c365586ec5c9223710ff7ffd27e825..bf92be135dc00495c48c954670d983f669e964b5 100644
--- a/plugins/configuration/tasks/class_tasks.inc
+++ b/plugins/configuration/tasks/class_tasks.inc
@@ -205,7 +205,7 @@ class tasks extends simplePlugin
               "fdTasksGranularDN"   => $dn,
               "fdTasksGranularType" => $taskType,
               // Verification as 'ref' could potentially not be present depending on the logic of the main task.
-              "fdTasksGranularRef"  => !empty($attrs['ref']) ? $attrs['ref'] : null,
+              "fdTasksGranularRef"  => !empty($attrs['ref'][$dn]) ? array_values($attrs['ref'][$dn]) : [],
             ];
             break;
         }
@@ -218,7 +218,7 @@ class tasks extends simplePlugin
         ];
         // Simply merged the common values and the custom ones depending on the attribute type passed.
         $values['tasksGranular'] = array_merge($prepData['tasksGranular'], $defaultData['tasksGranular']);
-
+        print_r($values);
         foreach ($values as $tab => $tabvalues) {
           if (!isset($tabObject->by_object[$tab])) {
             echo "Error tab does not contains attributes values" . PHP_EOL;
diff --git a/plugins/configuration/tasks/class_tasksGranular.inc b/plugins/configuration/tasks/class_tasksGranular.inc
index 2504202ddad0989e1457bc909885ae2b329aaf15..8dfbdd777394e3e201d3343f0fe802f43a49b3b7 100644
--- a/plugins/configuration/tasks/class_tasksGranular.inc
+++ b/plugins/configuration/tasks/class_tasksGranular.inc
@@ -25,15 +25,15 @@ class tasksGranular extends simplePlugin
   static function plInfo (): array
   {
     return [
-      'plShortName'   => _('Tasks Granular'),
-      'plDescription' => _('Granular tasks management allowing details reports'),
-      'plObjectClass' => ['fdTasksGranular'],
-      'plFilter'      => '(objectClass=fdTasksGranular)',
-      'plPriority'    => 41,
-      'plObjectType'  => ['tasksGranular' => [
-        'name'        => _('TasksGranular'),
-        'ou'          => get_ou('tasksRDN'),
-        'icon'        => 'geticon.php?context=applications&icon=tasks&size=16',
+      'plShortName'    => _('Tasks Granular'),
+      'plDescription'  => _('Granular tasks management allowing details reports'),
+      'plObjectClass'  => ['fdTasksGranular'],
+      'plFilter'       => '(objectClass=fdTasksGranular)',
+      'plPriority'     => 41,
+      'plObjectType'   => ['tasksGranular' => [
+        'name' => _('TasksGranular'),
+        'ou'   => get_ou('tasksRDN'),
+        'icon' => 'geticon.php?context=applications&icon=tasks&size=16',
       ]],
       'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo())
     ];
@@ -59,7 +59,7 @@ class tasksGranular extends simplePlugin
           new HiddenAttribute('fdTasksGranularStatus', TRUE, '1', '', 'Status', 'Status of the task'),
           new HiddenAttribute('fdTasksGranularMaster', TRUE, '', '', 'Master CN', 'Name of the Master task'),
           new HiddenAttribute('fdTasksGranularType', TRUE, '', '', 'Type', 'Type of the task'),
-          new HiddenAttribute('fdTasksGranularRef', FALSE, '', '', 'Type', 'Reference towards a required CN (mail template E.g'),
+          new HiddenArrayAttribute('fdTasksGranularRef', FALSE, '', '', 'Type', 'Reference towards a required CN (mail template E.g'),
           new DateTimeAttribute(
             _('Schedule'), '',
             'fdTasksGranularSchedule', FALSE
@@ -71,11 +71,11 @@ class tasksGranular extends simplePlugin
           ),
           // Below attributes are for tasks of type Mail
           new MailAttribute(
-             _('Email'),
-             _('Email address to which messages will be sent'), 'fdTasksGranularMail', FALSE),
+            _('Email'),
+            _('Email address to which messages will be sent'), 'fdTasksGranularMail', FALSE),
           new MailAttribute(
-             _('Email'),
-             _('Email address from which emails will be sent'), 'fdTasksGranularMailFrom', FALSE),
+            _('Email'),
+            _('Email address from which emails will be sent'), 'fdTasksGranularMailFrom', FALSE),
           new MailAttribute(
             _('Email'),
             _('BCC Email address'), 'fdTasksGranularMailBCC', FALSE),