diff --git a/SAILPOINT/Functions/ES_V2_GET_MAPICS_USER_INFO.sql b/SAILPOINT/Functions/ES_V2_GET_MAPICS_USER_INFO.sql
index 348507c..2f59c84 100644
--- a/SAILPOINT/Functions/ES_V2_GET_MAPICS_USER_INFO.sql
+++ b/SAILPOINT/Functions/ES_V2_GET_MAPICS_USER_INFO.sql
@@ -1 +1,98 @@
-âÅã@×ÁãÈ@\ÓÉÂÓ@^@
%
%ÃÙÅÁãÅ@ÖÙ@ÙÅ×ÓÁÃÅ@ÆäÕÃãÉÖÕ@âÁÉÓ×ÖÉÕãKÅâmåòmÇÅãmÔÁ×ÉÃâmäâÅÙmÉÕÆÖ@M@
%ÅÕåÉÙÖÕÔÅÕã@ÃÈÁÙMò]@k@
%ÕÁÔÅmÖÙmÉÄ@åÁÙÃÈÁÙMöð]@ÄÅÆÁäÓã@@ÕäÓÓ@@]@
%ÙÅãäÙÕâ@ÃÓÖÂMòñô÷ôøóöô÷]@@@
%ÓÁÕÇäÁÇÅ@âØÓ@
%â×ÅÃÉÆÉÃ@âÁÉÓ×ÖÉÕãKåòmÅâÙãåÔäâÙÉ@
%ÕÖã@ÄÅãÅÙÔÉÕÉâãÉÃ@
%ÔÖÄÉÆÉÅâ@âØÓ@ÄÁãÁ@
%ÃÁÓÓÅÄ@ÖÕ@ÕäÓÓ@ÉÕ×äã@
%ÕÖã@ÆÅÕÃÅÄ@
%âÅã@Ö×ãÉÖÕ@@ÁÓæÂÓÒ@~@\ÁÓÓÙÅÁÄ@k@
%ÁÓæÃ×èÄãÁ@~@\Ö×ãÉÔÉéÅ@k@
%ÃÖÔÔÉã@~@\ÕÖÕÅ@k@
%ÄÂÇåÉÅæ@~@\âÖäÙÃÅ@k@
%ÄÅÃÙÅâäÓã@~@Móñk@óñk@ðð]@k@
%ÄÓè×Ù×@~@\ÕÖ@k@
%ÄèÕÄÆãÃÖÓ@~@\ÕÖ@k@
%ÄèÕäâÙ×ÙÆ@~@\ÖæÕÅÙ@k@
%âÙãâÅØ@~@\ÈÅç@@@
%ÂÅÇÉÕ@
%âÅã@ÃÉâãÖÖÓâ@K@ÓÉÂÓ@~@ÃÉâãÖÖÓâ@K@âÅãmÓÉÂÙÁÙèmÓÉâã@M@ÅÕåÉÙÖÕÔÅÕã@]@^@
%ÙÅãäÙÕ@
%M@
%âÅÓÅÃã@ÑâÖÕmÖÂÑÅÃã@M@
%}„�£�}@z@
%ÑâÖÕmÁÙÙÁèÁÇÇ@M@
%ÑâÖÕmÖÂÑÅÃã@M@
%}…•¥É„}@åÁÓäÅ@ÃÉâãÖÖÓâ@K@ÔÁ×ÉÃâmÅÕå@k@}¤¢…™É„}@åÁÓäÅ@ãÙÉÔ@M@
%ÃÁâã@M@ÆðÂäÃÄ@Áâ@åÁÙÃÈÁÙ@M@ñð@]@ÃÃâÉÄ@ó÷@]@]@k@
%}¤¢…™Õ�”…}@åÁÓäÅ@ãÙÉÔ@M@
%ÃÁâã@M@ÆðÈñãç@Áâ@åÁÙÃÈÁÙ@M@öð@]@ÃÃâÉÄ@ó÷@]@]@k@
%}–—…™�£–™É„}@åÁÓäÅ@ãÙÉÔ@M@
%ÃÁâã@M@ÇäÁÁÈè@Áâ@åÁÙÃÈÁÙ@M@õ@]@ÃÃâÉÄ@ó÷@]@]@k@
%}¤¢…™ã¨—…}@åÁÓäÅ@ãÙÉÔ@M@ÃÁâã@M@
%ÃÁâÅ@Åçãè×Å@
%æÈÅÕ@}@}@ãÈÅÕ@}Ç…•…™�“@ä¢…™}@
%æÈÅÕ@}Á}@ãÈÅÕ@}Á„”‰•‰¢£™�£–™}@
%æÈÅÕ@}â}@ãÈÅÕ@}â¨¢£…”aÁ——“‰ƒ�£‰–•@ä¢…™}@
%æÈÅÕ@}Ç}@ãÈÅÕ@}Ç…•…™‰ƒ@ä¢…™}@
%ÅÓâÅ@}Mä•’•–¦•]}@
%ÅÕÄ@Áâ@åÁÙÃÈÁÙ@M@õð@]@ÃÃâÉÄ@ó÷@]@]@k@
%}¤¢…™Ä…—£}@åÁÓäÅ@ÑâÖÕmÖÂÑÅÃã@M@
%ãÙÉÔ@M@ÃÁâã@M@ÅçÄÅ×ã@Áâ@åÁÙÃÈÁÙ@M@ñð@]@ÃÃâÉÄ@ó÷@]@]@åÁÓäÅ@
%ãÙÉÔ@M@ÃÁâã@M@ÅäÄÅâÃ@Áâ@åÁÙÃÈÁÙ@M@öð@]@ÃÃâÉÄ@ó÷@]@]@
%ÁÂâÅÕã@ÖÕ@ÕäÓÓ@
%]@k@}¤¢…™Å”—Õ–}@åÁÓäÅ@ãÙÉÔ@M@
%ÃÁâã@M@ÅçãðøÁ@Áâ@åÁÙÃÈÁÙ@M@ñð@]@ÃÃâÉÄ@ó÷@]@]@k@
%}¢£�£¤¢}@åÁÓäÅ@ãÙÉÔ@M@ÃÁâã@M@
%ÃÁâÅ@ÅçâãÁã@
%æÈÅÕ@}Á}@ãÈÅÕ@}Áƒ£‰¥…}@
%æÈÅÕ@}@}@ãÈÅÕ@}ä•’•–¦•}@
%æÈÅÕ@}Ä}@ãÈÅÕ@}Ä‰¢�‚“…„}@
%ÅÕÄ@Áâ@åÁÙÃÈÁÙ@M@ñõ@]@ÃÃâÉÄ@ó÷@]@]@k@
%}¢£�™£Ô…•¤}@åÁÓäÅ@ãÙÉÔ@M@
%ÃÁâã@M@ÇäÁÄÔæ@Áâ@åÁÙÃÈÁÙ@M@ñõ@]@ÃÃâÉÄ@ó÷@]@]@k@
%}™–“…¢}@åÁÓäÅ@ÑâÖÕmÁÙÙÁè@M@âÅÓÅÃã@ÑâÖÕmÖÂÑÅÃã@M@
%ãÙÉÔ@M@ÃÁâã@M@ÅäÙÖÓÅ@Áâ@åÁÙÃÈÁÙ@M@òð@]@ÃÃâÉÄ@ó÷@]@]@åÁÓäÅ@
%ãÙÉÔ@M@ÃÁâã@M@ÅäÄÅâÃ@Áâ@åÁÙÃÈÁÙ@M@öð@]@ÃÃâÉÄ@ó÷@]@]@
%]@
%ÆÙÖÔ@ÅâäâÙ×@
%ÑÖÉÕ@ÅâÙÖÓ×@
%äâÉÕÇ@M@ÅäÙÖÓÅ@]@
%æÈÅÙÅ@ÅääâÅÙ@~@Ôé@K@ÆðÂäÃÄ@ÆÖÙÔÁã@ÑâÖÕ@]@k@
%}‰¢Ç™–¤—É„}@åÁÓäÅ@
%ÃÁâÅ@Ôé@K@ÆðäÇÙ×@
%æÈÅÕ@ñ@ãÈÅÕ@}£™¤…}@
%æÈÅÕ@ð@ãÈÅÕ@}†�“¢…}@
%ÅÕÄ@ÆÖÙÔÁã@ÑâÖÕ@
%]@
%]@k@
%}…™™–™¢}@z@ÑâÖÕmÁÙÙÁè@M@]@
%]@
%ÆÙÖÔ@ÔéÆðÙÅ×@Ôé@
%ÑÖÉÕ@ÅâäÅç×@
%ÓÅÆã@ÑÖÉÕ@ÅâÄ×ã×@
%ÖÕ@ÅçÄÅ×ã@~@ÅäÄÅ×ã@
%ÖÕ@Ôé@K@ÆðÂäÃÄ@~@ÅçäâÅÙ@
%ÓÅÆã@ÑÖÉÕ@ÔéÇäÃ×âð@
%ÖÕ@ÇäÂäÃÄ@~@Ôé@K@ÆðÂäÃÄ@
%æÈÅÙÅ@Åçãè×Å@Ln@}Ù}@
%ÁÕÄ@M@ÓÖÃÁãÅ@M@
%ä××ÅÙ@M@ãÙÉÔ@M@ÉÆÕäÓÓ@M@ÕÁÔÅmÖÙmÉÄ@k@Ôé@K@ÆðÂäÃÄ@]@]@]@k@
%ä××ÅÙ@M@Ôé@K@ÆðÂäÃÄ@]@]@n@ð@
%ÖÙ@ÓÖÃÁãÅ@M@
%ä××ÅÙ@M@ãÙÉÔ@M@ÉÆÕäÓÓ@M@ÕÁÔÅmÖÙmÉÄ@k@Ôé@K@ÆðÂäÃÄ@]@]@]@k@
%ä××ÅÙ@M@Ôé@K@ÆðÈñãç@]@]@n@ð@]@]@^@
%ÅÕÄ@@^@
%
%ÇÙÁÕã@ÁÓãÅÙ@k@ÅçÅÃäãÅ@@@
%ÖÕ@â×ÅÃÉÆÉÃ@ÆäÕÃãÉÖÕ@âÁÉÓ×ÖÉÕãKåòmÅâÙãåÔäâÙÉ@
%ãÖ@ÁÔÁ×ÉÃâ@æÉãÈ@ÇÙÁÕã@Ö×ãÉÖÕ@^@
%
%ÇÙÁÕã@ÅçÅÃäãÅ@@@
%ÖÕ@â×ÅÃÉÆÉÃ@ÆäÕÃãÉÖÕ@âÁÉÓ×ÖÉÕãKåòmÅâÙãåÔäâÙÉ@
%ãÖ@×äÂÓÉÃ@^@
%
%
\ No newline at end of file
+SET PATH *LIBL ; 
+
+CREATE OR REPLACE FUNCTION SAILPOINT.ES_V2_GET_MAPICS_USER_INFO ( 
+	ENVIRONMENT CHAR(2) , 
+	NAME_OR_ID VARCHAR(60) DEFAULT  NULL  ) 
+	RETURNS CLOB(2147483647)   
+	LANGUAGE SQL 
+	SPECIFIC SAILPOINT.V2_ESRTVMUSRI 
+	NOT DETERMINISTIC 
+	MODIFIES SQL DATA 
+	CALLED ON NULL INPUT 
+	NOT FENCED 
+	SET OPTION  ALWBLK = *ALLREAD , 
+	ALWCPYDTA = *OPTIMIZE , 
+	COMMIT = *NONE , 
+	DBGVIEW = *SOURCE , 
+	DECRESULT = (31, 31, 00) , 
+	DLYPRP = *NO , 
+	DYNDFTCOL = *NO , 
+	DYNUSRPRF = *OWNER , 
+	SRTSEQ = *HEX   
+	BEGIN 
+SET CISTOOLS . LIBL = CISTOOLS . SET_LIBRARY_LIST ( ENVIRONMENT ) ; 
+RETURN 
+( 
+SELECT JSON_OBJECT ( 
+'data' : 
+JSON_ARRAYAGG ( 
+JSON_OBJECT ( 
+'envId' VALUE CISTOOLS . MAPICS_ENV , 'userId' VALUE TRIM ( 
+CAST ( F0BUCD AS VARCHAR ( 10 ) CCSID 37 ) ) , 
+'userName' VALUE TRIM ( 
+CAST ( F0H1TX AS VARCHAR ( 60 ) CCSID 37 ) ) , 
+'operatorId' VALUE TRIM ( 
+CAST ( GUAAHY AS VARCHAR ( 5 ) CCSID 37 ) ) , 
+'userType' VALUE TRIM ( CAST ( 
+CASE EXTYPE 
+WHEN ' ' THEN 'General User' 
+WHEN 'A' THEN 'Administrator' 
+WHEN 'S' THEN 'System/Application User' 
+WHEN 'G' THEN 'Generic User' 
+ELSE '(Unknown)' 
+END AS VARCHAR ( 50 ) CCSID 37 ) ) , 
+'userDept' VALUE JSON_OBJECT ( 
+TRIM ( CAST ( EXDEPT AS VARCHAR ( 10 ) CCSID 37 ) ) VALUE 
+TRIM ( CAST ( EUDESC AS VARCHAR ( 60 ) CCSID 37 ) ) 
+ABSENT ON NULL 
+) , 'userEmpNo' VALUE TRIM ( 
+CAST ( EXT08A AS VARCHAR ( 10 ) CCSID 37 ) ) , 
+'status' VALUE TRIM ( CAST ( 
+CASE EXSTAT 
+WHEN 'A' THEN 'Active' 
+WHEN ' ' THEN 'Unknown' 
+WHEN 'D' THEN 'Disabled' 
+END AS VARCHAR ( 15 ) CCSID 37 ) ) , 
+'startMenu' VALUE TRIM ( 
+CAST ( GUADMW AS VARCHAR ( 15 ) CCSID 37 ) ) , 
+'roles' VALUE JSON_ARRAY ( SELECT JSON_OBJECT ( 
+TRIM ( CAST ( EUROLE AS VARCHAR ( 20 ) CCSID 37 ) ) VALUE 
+TRIM ( CAST ( EUDESC AS VARCHAR ( 60 ) CCSID 37 ) ) 
+) 
+FROM ESUSRP 
+JOIN ESROLP 
+USING ( EUROLE ) 
+WHERE EUUSER = MZ . F0BUCD FORMAT JSON ) , 
+'isGroupId' VALUE 
+CASE MZ . F0UGRP 
+WHEN 1 THEN 'true' 
+WHEN 0 THEN 'false' 
+END FORMAT JSON 
+) 
+) , 
+'errors' : JSON_ARRAY ( ) 
+) 
+FROM MZF0REP MZ 
+JOIN ESUEXP 
+LEFT JOIN ESDPTP 
+ON EXDEPT = EUDEPT 
+ON MZ . F0BUCD = EXUSER 
+LEFT JOIN MZGUCPS0 
+ON GUBUCD = MZ . F0BUCD 
+WHERE EXTYPE <> 'R' 
+AND ( LOCATE ( 
+UPPER ( TRIM ( IFNULL ( NAME_OR_ID , MZ . F0BUCD ) ) ) , 
+UPPER ( MZ . F0BUCD ) ) > 0 
+OR LOCATE ( 
+UPPER ( TRIM ( IFNULL ( NAME_OR_ID , MZ . F0BUCD ) ) ) , 
+UPPER ( MZ . F0H1TX ) ) > 0 ) ) ; 
+END  ; 
+
+GRANT ALTER , EXECUTE   
+ON SPECIFIC FUNCTION SAILPOINT.V2_ESRTVMUSRI 
+TO AMAPICS WITH GRANT OPTION ; 
+
+GRANT EXECUTE   
+ON SPECIFIC FUNCTION SAILPOINT.V2_ESRTVMUSRI 
+TO PUBLIC ; 
+
