diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php
index 21ced0498b..db79ed3c86 100644
--- a/pandora_console/include/functions_api.php
+++ b/pandora_console/include/functions_api.php
@@ -7509,7 +7509,7 @@ function api_set_planned_downtimes_additem($id, $thrash1, $other, $thrash3)
     $bad_agents = [];
     $i = 0;
     foreach ($total_agents as $agent_id) {
-        $result_agent = agents_check_access_agent($agent_id, 'AD');
+        $result_agent = agents_check_access_agent($agent_id, 'AR');
         if (!$result_agent) {
             $bad_agents[] = $agent_id;
             unset($agents[$i]);