and more in a single search tool across platforms. Read the announcement here. |
04/12/2024 04:46 AM
Hi,
I am getting an illegal character error in the logs when I am using the following web service call :
{
"name": "call2",
"callOrder": 1,
"connection": "${requestAccessAttributes.get('manager') != null && requestAccessAttributes.get('manager').length() > 0 ?'userAuthForB2C':''}",
"url": "${'https://graph.microsoft.com/v1.0/users?$count=true&$filter=userPrincipalName%20eq%20\\'' + requestAccessAttributes.get('manager').replaceAll(requestAccessAttributes.get('manager').substring(requestAccessAttributes.get('manager').indexOf('@')),'@domain.onmicrosoft.com') + '\\'&$select=id'}",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201,
204,
205
]
}
}
This is the error I am getting :
"2024-04-12T11:25:57.258+00:00","ecm-worker","","null-k2t2c","","2024-04-12T11:25:56.775408681Z stdout F 2024-04-12 11:25:56,775 [quartzScheduler_Worker-3] DEBUG rest.RestProvisioningService - Got Webservice API Response: [error:Error Illegal character in scheme name at index 0: ${'https://graph.microsoft.com/v1.0/users?$count=true&$filter=userPrincipalName%20eq%20\'' + requestAccessAttributes.get('manager').replaceAll(requestAccessAttributes.get('manager').substring(requestAccessAttributes.get('manager').indexOf('@')),'@domain.onmicrosoft.com') + '\'&$select=id'}]"
Kindly help resolve.
Best Regards,
Varun
04/12/2024 06:10 AM
Issue is with url
04/12/2024 08:35 PM
Hello @rushikeshvartak
I understand that, but can you help in pointing out the issue exactly. If i use the below URL, then it works -
"url": "${'https://graph.microsoft.com/v1.0/users?$count=true&$filter=mail%20eq%20\\'' + requestAccessAttributes.get('manager') + '\\'&$select=id'}"
Is there any problem with the replaceAll method ? The same method with the same logic is working fine in another part of the same JSON.
Best Regards,
Varun
04/12/2024 11:07 PM
Hi @varunpuri, escape the dollar sign before filter use ... \\$