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

how to invoke only one api call based on conditional check

iam01
Regular Contributor
Regular Contributor

I want to trigger one call based on the conditional check. i tried few options but stuck with error. However what i observed is connection name is mandatory.

 

{
    "accountIdPath": "accountName",
    "responseColsToPropsMap": {
        "displayName": "#CONST#${user.displayname}~#~char"
    },
    "call": [
        {
            "name": "call1",
            "connection": "${if(user.customproperty12 == 'RehireBefore90'){'acctAuth'}else {''}}",
            "url": "https://xx.net/Saviynt/PS/ExecutePSScript",
            "httpMethod": "POST",
            "httpParams": "{\"script\":\"C:\\\\\\\\Scripts\\\\\\\\rehireuser1.ps1 -useremail \\\"${user.email} \"}",
            "httpHeaders": {
                "Authorization": "${access_token}"
            },
            "httpContentType": "application/x-www-form-urlencoded",
            "successResponses": {
                "response[0].CompletedSuccessfully": [
                    "True"
                ]
            }
        },
        {
            "call": [
                {
                    "name": "call2",
                    "connection": "${if(user.customproperty12 == 'RehireAfter90'){'acctAuth'}else {''}}",
                    "url": "https://xx/Saviynt/PS/ExecutePSScript",
                    "httpMethod": "POST",
                    "httpParams": "{\"script\":\"C:\\\\\\\\Scripts\\\\\\\\CreateRemoteUserMailBox1.ps1 -sam \\\"${user.systemUserName}\\\" -upn \\\"${user.email}\\\" \"}",
                    "httpHeaders": {
                        "Authorization": "${access_token}"
                    },
                    "httpContentType": "application/x-www-form-urlencoded",
                    "successResponses": {
                        "response[0].EmailAddressPolicyEnabled": [
                            "True"
                        ]
                    }
                }
            ]
        }
    ]
}

 

ERROR :

"call1":{"message":"Ambiguous method overloading for method java.lang.String#<init>.\nCannot resolve which method to invoke for [null] due to overlapping prototypes between:\n\t[class [B]\n\t[class [C]\n\t[class java.lang.String]","status":"Failed"}}



4 REPLIES 4

iam01
Regular Contributor
Regular Contributor

syntax error. resolved

Can you share updated JSON


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

mayankshah
Regular Contributor
Regular Contributor

What is the syntax error that you resolved? can you please share the details?

divya
Saviynt Employee
Saviynt Employee

Can you please share the JSON or the details which syntax was throwing error