Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

getting tasks failed if did not assign manager to user

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on November 5 2021 at 08:50 UTC

Hello,


Could you please help correct me the create account json if we no need to assign manager to user for some employees.


case1: Failed if we did not assign manager


\"manager\": \"${managerAccount?.accountID==null?'':managerAccount.accountID}\"

case 2: Success if we assign manager



Thanks in advance!!



Thanks,


Ramana


This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.
19 REPLIES 19

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on November 5 2021 at 18:02 UTC

Hi Ramana,


What error do you see in the logs ?




Regards,

Avinash Chhetri

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on November 9 2021 at 07:34 UTC

Hi Avinash,


Thanks for your response!


Please find below log while creating account getting issue


Nov 2021 06:50:51 GMT","server":"nginx","content-length":"54","x-response-time":"79.937ms","content-type":"text/html; charset=utf-8","etag":"W/\"36-mTFNQllCDRmGMeyQpcOlNHqY7io\""},"message":{"responseMessage":"Cast to ObjectID failed for value \"\" at path \"manager\""},"statusCode":400,"description":null,"status":"Failed"},{"headers":{"date":"Tue, 09 Nov 2021 06:53:10 GMT","server":"nginx","content-length":"54","x-response-time":"175.672ms","content-type":"text/html; charset=utf-8","etag":"W/\"36-mTFNQllCDRmGMeyQpcOlNHqY7io\""},"message":{"responseMessage":"Cast to ObjectID failed for value \"\" at path \"manager\""},"statusCode":400,"description":null,"status":"Failed"}]},"call1":{"headers":{"date":"Tue, 09 Nov 2021 06:55:49 GMT","server":"nginx","content-length":"119","x-response-time":"89.053ms","content-type":"text/html; charset=utf-8","etag":"W/\"77-jPtlCrOtzy0x/Cojpt4Wr98R/rQ\""},"message":{"responseMessage":"Cast to ObjectID failed for value \"${managerAccount?.accountID==null?\\'\\':managerAccount.accountID}\" at path \"manager\""},"statusCode":400,"description":null,"status":"Failed"}}


Thanks,

Ramana

Persistent Systems

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on November 9 2021 at 17:35 UTC

Hi Ramana,


This seems like the snippet from the tasks under provisioning comments I believe. What is the value of the manager field that Saviynt generates that you see in the logs.

What does the application expect in that value ? Which target sysem is this for ?




Regards,

Avinash Chhetri

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on November 9 2021 at 19:51 UTC

Hello Avinash,


This issue is observed even for AD account in V2021. Even if null check is added for managerAccount binding variable.


Thanks,

Pallavi

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on November 10 2021 at 08:13 UTC

Hi Avinash,


Thanks for your comment


It is a rest connector and expecting either manager AccountID or null.


PFB ss from application manager search attribute.


image


Thanks,

Ramana

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on November 10 2021 at 22:59 UTC

Hi Ramana,


I assume the manager account ID is a username or is it an email or a DN ? Does this accountid also part of the managers profile (user profile) ?


If the user doesnt have a manager or manager doesnt have an account, youre expected to send a NULL value or an empty String like you have configured in your logic ?




Regards,

Avinash Chhetri


This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on November 11 2021 at 05:54 UTC

Thanks for your response


logic is failing if user doesn't have a manager and we are expecting to send empty.

\"manager\": \"${user?.manager==null||user.?manager==''?'':managerAccount.accountID}\"


Thanks,

Ramana

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on November 11 2021 at 21:21 UTC

Hi Ramana,


I can see a syntax error in your logic. It is always good to check the logs to see why it is failing.


\"manager\": \"${user?.manager==null||user.?manager==''?'':managerAccount.accountID}\" 


\"manager\": \"${user?.manager==null||user?.manager==''?'':managerAccount.accountID}\"


Also using brackets to wrap your conditions in the logic would be a better way


\"manager\": \"${(user?.manager==null||user?.manager=='')?'':managerAccount.accountID}\"  




Regards,

Avinash Chhetri


This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on December 7 2021 at 07:21 UTC

Hi Avinash,


This is not resolved and am facing same issue.


am able to creating account from post man with null value of Manager label.

ex: "manager": null


 

am getting cast ObjectID error when trying from Saviynt.


Kindly suggest some other ways for null check of Manager label.


Thanks,

Ramana

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on December 7 2021 at 16:28 UTC

Ramana,


Can you let me know which application is this for ?


Also please share the entire provisioning logic and the logs from the failed run to help you.





Regards,

Avinash Chhetri

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on December 7 2021 at 18:20 UTC

Hi Avinash,


Thanks for your response!!


Integrating Jump Cloud Rest Application with Saviynt V2021 and please find below logic and error.


\"manager\": \"${if(managerAccount?.accountID!=null){managerAccount.accountID}else {''}}\"


error:

 charset=utf-8","etag":"W/\"3a-f9qYsgAnmPaUeiY5ZdGz6XRpBp0\""},"message":{"responseMessage":"Cast to ObjectID failed for value \"null\" at path \"manager\""},"statusCode":400,"description":null,"status":"Failed"}]},



Thanks,


Ramana

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on December 7 2021 at 19:47 UTC

Ramana,


Application logs where it shows the full sequence of events will be helpful.




Regards,

Avinash Chhetri

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on December 8 2021 at 13:58 UTC

Hi Avinash,


Thanks for your support!


PFA of application logs.


Thanks,

Ramana

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on December 9 2021 at 01:31 UTC

Ramana,


Based on the information from the logs and as per my understanding, when your JSON is getting resolved, the manager entry is getting removed entirely (highlighted in the snippet below).


Here's what your logic gets resolved to:


 {

 \"firstname\": \"demo\", 

 \"lastname\": \"user999\",

 \"middlename\": \"null\",

 \"email\": \"demo.user999@dev.<REDACTED>.com\", 

 \"username\": \"demo.user999\",

 \"employeeType\": \"null\", ,\"alternateEmail\": \"demo.user999@gmail.com\"

 };



I believe your manager logic is between the employeeType and the alternateEmail address.


Perhaps, try using a conditional operator e.g. ${managerAccount.accountID==null?'':managerAccount.accountID} and check the logs on what is it actually resolving to.





Regards,

Avinash Chhetri 


This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on December 9 2021 at 06:50 UTC

Hi Avinash,


Thanks for your reply!!!


Am getting same issue.


2021-12-09 06:31:24,554 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - Task Response: {"call1":{"headers":{"date":"Thu, 09 Dec 2021 06:31:24 GMT","server":"nginx","content-length":"117","x-response-time":"79.671ms","content-type":"text/html; charset=utf-8","etag":"W/\"75-0YUVHTi6CTQP9WvkbPrG+JFDqko\""},"message":{"responseMessage":"Cast to ObjectID failed for value \"${managerAccount.accountID==null?\\'\\':managerAccount.accountID}\" at path \"manager\""},"statusCode":400,"description":null,"status":"Failed"}}


Thanks,

Ramana

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on December 9 2021 at 07:35 UTC

Hi Avinash, 



Thanks for your support!!!



As suggested, have tried with same condition but getting same issue.


2021-12-09 06:31:25,255 [quartzScheduler_Worker-4] DEBUG rest.RestProvisioningService - Task Response: {"call1":{"headers":{"date":"Thu, 09 Dec 2021 06:31:25 GMT","server":"nginx","content-length":"117","x-response-time":"99.931ms","content-type":"text/html; charset=utf-8","etag":"W/\"75-0YUVHTi6CTQP9WvkbPrG+JFDqko\""},"message":{"responseMessage":"Cast to ObjectID failed for value \"${managerAccount.accountID==null?\\'\\':managerAccount.accountID}\" at path \"manager\""},"statusCode":400,"description":null,"status":"Failed"}}



Thanks,

Ramana



This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on December 9 2021 at 15:46 UTC

Ramana,


Have you ever been successful to provision a account with a manager information in this application ?


If Yes, can you let me know if, every user is supposed to have a manager or not and every manager does have an account in that system ?


What is the value of the accountID attribute under accounts for user accounts ?


If not, Try and pass a static value in your JSON and try to provision the account. What is the data type that the manager field expects, a string ? 




Regards,

Avinash Chhetri

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on December 9 2021 at 17:24 UTC

Hi Avinash,


Thanks for your continuous support!!!


We have created accounts with manager and can able to create account without manager at application end.

accountID value is String.


am getting same issue even passing the static value.


Thanks,

Ramana




This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on December 9 2021 at 17:47 UTC

I believe you need to make it work with a static string first to understand how it actually works.

Just ensure the value you are passing in the manager field is exactly what the application expects.



Regards,

Avinash Chhetri

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.