Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Execute GET method within createaccountjson and use variables character

JPMac
Regular Contributor
Regular Contributor

This post is related to the following Forum link.

 
I need to execute an import in call1 of createaccount using the email address of the user for whom the account is being created as a filter.

===createaccountjson===
{
    "accountIdPath": "call1.message.id",
    "dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
    "responseColsToPropsMap": {
        "comments": "call1.message.displayName~#~char",
        "displayName": "call1.message.displayName~#~char",
        "name": "call1.message.userPrincipalName~#~char"
    },
    "call": [
        {
            "name": "call1",
            "connection": "userAuth",
            "url": "https://graph.microsoft.com/v1.0/users?$filter=mail%20eq%20'<user.email>'",
            "httpMethod": "GET",
            "httpHeaders": {
                "Authorization": "${access_token}",
                "Content-Type": "application/json"
            },
            "httpContentType": "application/json",
            "successResponses": {
                "statusCode": [
                    200,
                    201,
                    204,
                    205
                ]
            }
        }
    ]
}

However, even after trying the following three patterns in the URL, the value remains blank or the job does not succeed at all.
 
-> Task is not completed because illegal charactor (log is below)
2024-06-04T18:36:29+09:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-1-ztkmw-DEBUG-Got Webservice API Response: [error:Error Illegal character in query at index 51: https://graph.microsoft.com/v1.0/users?$filter=mail eq '${account.accountID}']


-> task is completed but value is null. (below is provision comment in task)
call1":{"headers":"gHbT2dtDnQxurBrcCkvNqqP0cq4FT6ZSWvASI1nGTwRDSsanUBJ0fyKwBTkZ/4AloBp8ib5gdCvDcUPnk3aTo/jgygu1wLzBIt+6wX7XZyKSQGSSlh0LPPOGBEps0U1AqtsZgV1GULV47mNHvoVw5Nq22rU+ZoiJG6c50PIssSrF9EX+Zx5/motoM6fsYC7teRfLm8eGG/T2p5NNaTsIAAu/lnoaO00SMckYZpVs2AZmVrUnjnk9g4tmsudN/OxsSd2TXwhFP7oBtVUmd/sU81THQv2nNBSpbbVC1fftQBKgsPsSo1h7s0343nf3B3RfhCj1llROKCYg61y40T5AOd50XyZggINN0a0jv8LXwIslw9rx8cRZ6trjknp7+7UiwQjrA00nvXyVOzBBfg3s8VvNXFT4cZfpy7bPYqyCiNfYioxCqAe9LsGp3mDJXZoLI6dV+Gxq9/+Ld9hkAQfHTq1haN0RHDVX4a+OP2RNsBcyzJWnJbncfwNCNEja3ppP4kFw9RJo8QRKjv1Mpxbolv/L5TOuzovzhi6MM7UTf78qoCDfuepJf55hAA1SCx3eQ9p3P1SpDQkeo0P0oms5jMELArFim1uOIcmtE/GFuYw1Z0lRr3TweDPg3LB06C3g9rrFjs+PXmOilAy8murGOE8w+MmEAaLa2vJwyiwmW7H6qziXWZk23ByGcBjJn4Ft1OeAqmStkw8hs91JKR5DGuSryzZCmKXyvJValoDqKzuEaDapUskXRhsBFrt/2TmcX3goKoRK7flO+mtI8f/IN5p6eEQx2TwGIIAif9VO/fLcwRKpo1etGtplLpGDP/8v","message":{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users","value":[]},"statusCode":200,"description":null,"status":"Success"}}
 
-> same results with url2

How should I specify the import filter using the email address of the Azure AD user to ensure success?
4 REPLIES 4

rushikeshvartak
All-Star
All-Star

{
"accountIdPath": "call1.message.id",
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"responseColsToPropsMap": {
"comments": "call1.message.displayName~#~char",
"displayName": "call1.message.displayName~#~char",
"name": "call1.message.userPrincipalName~#~char"
},
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "https://graph.microsoft.com/v1.0/users?$filter=mail eq '${user.email}'",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201,
204,
205
]
}
}
]
}


Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.

JPMac
Regular Contributor
Regular Contributor

@rushikeshvartak ,

Thanks for your response.

The task failed even when using that URL.
Provisioning comments:

{"call1":{"headers":null,"message":"","statusCode":null,"description":null,"status":"Failed"}}

Log viewer log:

2024-06-05T08:12:30+09:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-4-ztkmw-DEBUG-Got Webservice API Response: [error:Error Illegal character in query at index 51: https://graph.microsoft.com/v1.0/users?$filter=mail eq '${user.email}']

2024-06-05T08:12:30+09:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-4-ztkmw-DEBUG-Calling Webservice Url - https://graph.microsoft.com/v1.0/users?$filter=mail eq '${user.email}' with httpParams - null

Refer https://forums.saviynt.com/t5/identity-governance/import-azure-ad-user-by-using-filter-on-lastcreate... 


Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.

JPMac
Regular Contributor
Regular Contributor

I referred to this Forum and the following JSON worked. Thank you.

{
    "accountIdPath": "call1.message.id",
    "dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
    "responseColsToPropsMap": {
        "comments": "call1.message.displayName~#~char",
        "displayName": "call1.message.displayName~#~char",
        "name": "call1.message.userPrincipalName~#~char"
    },
    "call": [
        {
            "name": "call1",
            "connection": "userAuth",
            "url": "https://graph.microsoft.com/v1.0/users?\\$filter=mail+eq+'${user.email}'",
            "httpMethod": "GET",
            "httpHeaders": {
                "Authorization": "${access_token}",
                "Content-Type": "application/json"
            },
            "httpContentType": "application/json",
            "successResponses": {
                "statusCode": [
                    200,
                    201,
                    204,
                    205
                ]
            }
        }
    ]
}