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

Issue while calling multiple APIs for update account

Ankky
Regular Contributor
Regular Contributor

Hello,

I am trying to invoke 2 APIs during the update account operation but getting the following error in the logs - ERROR rest.RestProvisioningService - Error in processWebservicejava.lang.NullPointerException: Cannot invoke method size() on null object"

Any pointers on what is going wrong?

JSON:

{
"Call": [
{
"name": "call1",
"connection": "userAuth",
"url": "https://graph.microsoft.com/v1.0/users/${account.accountID}/authentication/emailMethods",
"httpMethod": "GET",
"httpParams": "{}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201,
204,
205
]
},
"unsuccessResponses": {
"odata~dot#error.code": [
"Request_BadRequest",
"Authentication_MissingOrMalformed",
"Request_ResourceNotFound",
"Authorization_RequestDenied",
"Authentication_Unauthorized"
]
}
},
{
"name": "call2",
"connection": "userAuth",
"url": "https://graph.microsoft.com/v1.0/users/${account.accountID}/authentication/emailMethods/$if(response...] != ''){response.call1.message.value[0]}else{''}",
"httpMethod": "$if(response.call1.message.value[0] != ''){POST}else{'PATCH'}",
"httpParams": "{\"emailaddress\":\"${user.customproperty3}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201,
204,
205
]
},
"unsuccessResponses": {
"odata~dot#error.code": [
"Request_BadRequest",
"Authentication_MissingOrMalformed",
"Request_ResourceNotFound",
"Authorization_RequestDenied",
"Authentication_Unauthorized"
]
}
}
]
}

Thanks

6 REPLIES 6

rushikeshvartak
All-Star
All-Star

Can you share logs


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

Hello @rushikeshvartak ,

Thanks for the response. I have attached the logs.

Also, I am just trying to update the user account, however, in the task it shows 7 more tasks with this request. What does this refer to?

Ankky_0-1701946908154.png

 

7 tasks must be child entitlements hence child tasks created.

if rest connector is used can you enable showlogs: true in configJSON


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

Hi @rushikeshvartak ,

Thanks for your response!

I am not updating any entitlements as part of this request. I am only trying to update an attribute. showLogs is enabled but the logs aren't indicating issue with the json. I even tried hardcoding everything in the json but it still shows the same issue.

Could you please help me identify the issue.

Ankky
Regular Contributor
Regular Contributor

I was able to identify the issue. 'Call' in json should be in all small case.

"call" keyword should be lowercase


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