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

Create Account JSON is not working in REST connection

Rajesh_CH
New Contributor
New Contributor

Hello, I am facing isssue with create account and getting error message as "{"headers":null,"message":"","statusCode":null,"description":null,"status":"Failed"}]}" while create account task executes. Below are the JSONs.
Connection JSON:
{
"authentications": {
"userAuth": {
"authType": "oauth2",
"url": "xxxxxxx",
"httpMethod": "POST",
"httpHeaders": {
"Accept": "*/*",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"httpParams": {
"username": "xxxx",
"password": "xxxxx"
},
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed",
"FAILURE",
"INVALID_SESSION_ID"
],
"retryFailureStatusCode": [
403,
401,
500
],
"timeOutError": "Read timed out",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "token",
"tokenType": "",
"accessToken": "abcd",

"successResponses": {
"statusCode": [
200,
201
]
}
}
}
}

Create account JSON:

{
    "accountIdPath": "call1.message.list.id",
    "call": [
        {
            "name": "call1",
            "connection": "userAuth",
            "url": "xxxxxxx",
            "httpMethod": "POST",
            "httpParams": "{\"workItems\": [{\"json\": {\"Customer Name\": \"Test IntraFi\",\"Invoice Id\": \"INV12345\",\"Amount\":\"200\",\"email\": \"testuser@pop.com\",\"Invoice Date\": \"2024-08-20T00:20:50Z\",\"applicationName\":\"Test IntraFi\",\"taskType\":\"create\",\"taskId\": \"12345\"}}]}",
            "httpHeaders": {
                "X-Authorization": "${token}",
"Content-Type": "application/json"
            },
            "httpContentType": "application/json",
            "successResponses": {
                "statusCode": [
                    200,
                    201,
                    204,
                    205
                ]
            },
"unsuccessResponses": {
      "statusCode": [
        400,
        403,
        401,
        404,
        409,
        500,
        501
      ]
        }
 }
I am trying with hardcode values for testing.
Attached postman screens shots for reference:

Please review and help me on this issue.

 

17 REPLIES 17

rushikeshvartak
All-Star
All-Star

{
"authentications": {
"userAuth": {
"authType": "oauth2",
"url": "xxxxxxx",
"httpMethod": "POST",
"httpHeaders": {
"Accept": "*/*",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"httpParams": {
"username": "xxxx",
"password": "xxxxx"
},
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed",
"FAILURE",
"INVALID_SESSION_ID"
],
"retryFailureStatusCode": [
403,
401,
500
],
"timeOutError": "Read timed out",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "token",
"tokenType": "Bearer",
"accessToken": "abcd",

"successResponses": {
"statusCode": [
200,
201
]
}
}
}
}


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

Hi @rushikeshvartak I tried above connection JSON, but getting error :  {"headers":null,"message":{"message":"Auth Config Token claim is required in OAuth2 access token"},"statusCode":400,"description":null,"status":"Failed"}}

Rajesh_CH_0-1724234434099.png

Rajesh_CH_1-1724234533093.png

 

Please share postman screenshot and curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]



⚠️‼️‼️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.‼️‼️⚠️


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

Hi @rushikeshvartak PFA postman and curl command screen shots.

Please add inline images and curl url in text  [You can edit previous message]


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

Hi @rushikeshvartak,

Create Account - Curl:
----------------------
curl --location 'https://xxxxxxxxx/v3/wlm/queues/2/workitems' \
--header 'Content-Type: application/json' \
--header 'X-Authorization: eyJhbGcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxBxDRSncdShbCg7UTN3EthULuCQ_DfayDxW3JMnw' \
--data-raw '{
"workItems": [
{
"json": {
"Customer Name": "xxxx",
"Invoice Id": "xxxx",
"Amount": "1xx0",
"email": "xxxx.com",
"Invoice Date": "20xxxx8:48Z",
"applicationName" : "xxxx",
"taskType":"create",
"taskId":"1234"
}
}
]
}'

Token Curl:
----------
curl --location 'https://xxxxxx/v1/authentication' \
--header 'Content-Type: application/json' \
--data-raw '{
"username": "xxxxxx",
"password": "xxxxx"
}'

  • I don't think this will be supported as saviynt always add Bearer keyword in start and here in token generated does not need as prefix

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

Hi @rushikeshvartak  Thank you for the update. Please let me know, what should we do in this case.? suggest us how to resolve this issue.?

Raise idea ticket for enhancement or achieve using jar connector


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

Hi @rushikeshvartak Please let me know, how can I create jar connector.? how to do this process.? I am not aware of this process.?

Refer https://docs.saviyntcloud.com/bundle/JAR-v24x/page/Content/Understanding-the-JAR-Package-Framework-a...


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

Vedanth-BK
Regular Contributor
Regular Contributor

hello Rajesh 

specify X-Authorization as authheader in connection json  and  in the create account json  use the below 
   "X-Authorization": "${access_token}"


Thank you
Vedanth B.K
If you find my response helpful and it works, Hit the 'Kudos' button and accept it as a solution!!

Hi @Vedanth-BK  I did changes in connetion JSON and create account JSON as you suggested, but still getting error "[{"headers":null,"message":"","statusCode":null,"description":null,"status":"Failed"}]},"
Attached error logs:

stalluri
Valued Contributor
Valued Contributor
    "accountIdPath": "call1.message.list.id",
    "call": [
        {
            "name": "call1",
            "connection": "userAuth",
            "url": "xxxxxxx",
            "httpMethod": "POST",
            "httpParams": "{\"workItems\": [{\"json\": {\"Customer Name\": \"Test IntraFi\",\"Invoice Id\": \"INV12345\",\"Amount\":\"200\",\"email\": \"testuser@pop.com\",\"Invoice Date\": \"2024-08-20T00:20:50Z\",\"applicationName\":\"Test IntraFi\",\"taskType\":\"create\",\"taskId\": \"12345\"}}]}",
            "httpHeaders": {
                "X-Authorization": "XXXXXXX Hardcode the token you get from postman and try it.XXXXXXX",
"Content-Type": "application/json"
            },
            "httpContentType": "application/json",
            "successResponses": {
                "statusCode": [
                    200,
                    201,
                    204,
                    205
                ]
            },
"unsuccessResponses": {
      "statusCode": [
        400,
        403,
        401,
        404,
        409,
        500,
        501
      ]
        }
 }

Best Regards,
Sam Talluri
If you find this a helpful response, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hello @Vedanth-BK,
Attached required input details.

Vedanth-BK
Regular Contributor
Regular Contributor

Hello @Rajesh_CH 

Please try with the below jsons and let me know if you face any issues.

Thank you
Vedanth B.K
If you find my response helpful and it works, Hit the 'Kudos' button and accept it as a solution!!

stalluri
Valued Contributor
Valued Contributor

@Rajesh_CH 

Create Account:
{
    "accountIdPath": "call1.message.list.id",
    "call": [
        {
            "name": "call1",
            "connection": "userAuth",
            "url": "xxxxxxx",
            "httpMethod": "POST",
            "httpParams": "{\"workItems\": [{\"json\": {\"Customer Name\": \"Test IntraFi\",\"Invoice Id\": \"INV12345\",\"Amount\":\"200\",\"email\": \"testuser@pop.com\",\"Invoice Date\": \"2024-08-20T00:20:50Z\",\"applicationName\":\"Test IntraFi\",\"taskType\":\"create\",\"taskId\": \"12345\"}}]}",
            "httpHeaders": {
                "X-Authorization": "XXXXXXX Hardcode the token you get from postman and try it XXXXXXX",
"Content-Type": "application/json"
            },
            "httpContentType": "application/json",
            "successResponses": {
                "statusCode": [
                    200,
                    201,
                    204,
                    205
                ]
            },
"unsuccessResponses": {
      "statusCode": [
        400,
        403,
        401,
        404,
        409,
        500,
        501
      ]
        }
 }

Connection JSON:

{
    "authentications": {
        "userAuth": {
            "authType": "oauth2",
            "url": "xxxxxxxxxxx/v1/authentication",
            "httpMethod": "POST",
            "httpHeaders": {
                "Content-Type": "application/json"
            },
            "httpContentType": "application/json",
            "httpParams": {},
            "properties": {
                "userName": "username",
                "password": "password"
            },
            "authError": [
                "InvalidAuthenticationToken",
                "AuthenticationFailed",
                "FAILURE",
                "INVALID_SESSION_ID"
            ],
            "retryFailureStatusCode": [
                401
            ],
            "timeOutError": "Read timed out",
            "errorPath": "error.code",
            "maxRefreshTryCount": 5,
            "authHeaderName": "X-Authorization",
            "tokenResponsePath": "token",
            "tokenType": "",
            "accessToken": "abcd"
        }
    }
}


 


Best Regards,
Sam Talluri
If you find this a helpful response, kindly consider selecting Accept As Solution and clicking on the kudos button.