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

CreateAccountJSON not working for REST

DG1811
New Contributor III
New Contributor III

Hi Team,

We are integrating a new application where we have the below payload that we need to send as part of the createaccountjson. 

CreateuserPayload : 

{
"email": "useremail@domain.com",
"clientId": 12345, (entitlement type1)
"userName": "firstname lastname",
"firstName": "firstname",
"lastName": "lastname",
"permissionGroupId": 5, (entitlement type2)
"reportGroupId": 4, (entitlement type3)
"userid": "userid",
"Inactive": false
}

 

CreateAccountjson:
{
"accountIdPath": "call1.message.user.eid",
"responseColsToPropsMap": {
"accountID": "call1.message.user.eid~#~char"
},
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"showResponse": true,
"url": "https://xxxxxxxxxxxxxxx/api/v1/saviyntIntegration/AddUser",
"httpMethod": "POST",
"httpParams": "{\"user\": {\"email\":\"${user.email}\",\"clientId\": \"14760\",\"userName\":\"${user.firstname+' '+user.lastname}\",\"firstName\": \"${user.firstname}\",\"lastName\": \"${user.lastname}\",\"permissionGroupId\":\"5\",\"reportGroupId\":\"4\",\"inactive\": \"false\",\"eid\": \"${user.username}\"}}",
"httpHeaders": {
"Authorization": "${access_token}",
"client_id": "id",
"client_secret": "secret",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200
]
},
"unsuccessResponses": {
"statusCode": [
401,
400,
403,
404
]
}
}
]
}


As of now we are sending the default values for entitlements, but we need to pass the value selected in the ars form in the ADD Access json. 
But the create account json doesnot seem to be working. 

Logs attached for reference. Please guide is the json has any problem.

 

Thanks

13 REPLIES 13

rushikeshvartak
All-Star
All-Star

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

Logs attached.

Your connector MS pod is unhealthy raise support ticket to restart connector pod 

"2024-08-27T10:43:11.762+00:00","ecm","connectorms.ConnectorMsHelperService","http-nio-8080-exec-77-wn6m4","ERROR","401 Unauthorized"


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

Hi @rushikeshvartak ,
I checked with other application provisioning too, and seems they are working fine. It must not be the case with one application, right. 

Thanks

 

Share postman curl & screenshot


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

Hi @rushikeshvartak ,
Please find the below screenshot from postman.

DG1811_0-1724829084673.png

Thanks

 Curl ?


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

stalluri
Valued Contributor II
Valued Contributor II

@DG1811 

Can you also share the connection Json?


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

DG1811
New Contributor III
New Contributor III

Hi @stalluri ,
Below is the connection we are using.
{
    "authentications": {
        "acctAuth": {
            "authType": "Inherit auth from parent",
            "url": "https://xxxxxxxxxxxxxxxxx/api/v1/saviyntIntegration/GetAllClients" ,
            "httpMethod": "GET",
            "httpParams": {
                "grant_type": "client_credentials",
                "client_secret": "xxxxxxxxxxxxxxxxxxxxxxxx",
                "client_id": "xxxxxxxxxxxxxxxxxxxxxxx"
            },
            "httpHeaders": {
                "Accept": "*/*"
            },
            "timeOutError": "Read timed out",
            "errorPath": "error.code",
            "retryFailureStatusCode": [
                401
            ],
            "maxRefreshTryCount": 3,
            "apiRateLimitConfig": {
                "retryAfterCalls": 100,
                "retryWaitSeconds": 60
            }
        }
    }
}

 

Thanks

[This message has been edited by moderator to disable URL hyperlink]

stalluri
Valued Contributor II
Valued Contributor II

@DG1811 
Can you try these and also share the curl command from Postman?

{
    "authentications": {
        "acctAuth": {
            "authType": "oauth2",
            "url": "https://hostname/ws/rest/service/v1/login",
            "httpMethod": "GET",
            "httpHeaders": {
                "Content-Type": "application/x-www-form-urlencoded",
                "Authorization": "Basic <USER:PASSWORD in 64bit encode>" //<Copy the value directly from header in the postman and paste it here>
            },
            "properties": {
                "grant_type": "client_credentials",
                "client_secret": "xxxxxxxxxxxxxxxxxxxxxxxx",
                "client_id": "xxxxxxxxxxxxxxxxxxxxxxx"
            },
            "httpContentType": "application/x-www-form-urlencoded",
            "expiryError": "Access token is expired.",
            "authError": [
                "ExpiredAuthenticationToken",
                "Access token is expired.",
                "InvalidAuthenticationToken",
                "USER_AUTHENTICATION_FAILED",
                "PARTNER_AUTHENTICATION_FAILED",
                "AuthenticationFailed"
            ],
            "timeOutError": "Read timed out",
            "errorPath": "message",
            "maxRefreshTryCount": 5,
            "tokenResponsePath": "token",
            "tokenType": "Bearer",
            "retryFailureStatusCode": [
                401
            ],
            "accessToken": "Bearer asdfghjkjhgfdsasdfgh"
        }
    }
}


                                      or

{
    "authentications": {
        "acctAuth": {
            "authType": "InheritAuthFromParent",
            "url": "https://hostname/ws/rest/service/v1/login",
            "httpMethod": "GET",
            "httpHeaders": {
                "Content-Type": "application/x-www-form-urlencoded",
                "Authorization": "Basic <USER:PASSWORD in 64bit encode>" //<Copy the value directly from header in the postman and paste it here>
            },
            "httpParams": {
                "grant_type": "client_credentials",
                "client_secret": "xxxxxxxxxxxxxxxxxxxxxxxx",
                "client_id": "xxxxxxxxxxxxxxxxxxxxxxx"
            },
            "httpContentType": "application/x-www-form-urlencoded",
            "expiryError": "Access token is expired.",
            "authError": [
                "ExpiredAuthenticationToken",
                "Access token is expired.",
                "InvalidAuthenticationToken",
                "USER_AUTHENTICATION_FAILED",
                "PARTNER_AUTHENTICATION_FAILED",
                "AuthenticationFailed"
            ],
            "timeOutError": "Read timed out",
            "errorPath": "message",
            "maxRefreshTryCount": 5,
            "tokenResponsePath": "token",
            "tokenType": "Bearer",
            "retryFailureStatusCode": [
                401
            ],
            "accessToken": "Bearer asdfghjkjhgfdsasdfgh" 
        }
    }
}






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

DG1811
New Contributor III
New Contributor III

Thanks @stalluri @rushikeshvartak , for the inputs.

We have achieved it, user creation was done, there was issue in the connection json. But we have some questions arised, will check on that in a different post. 

Thanks

Please share working JSON


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

stalluri
Valued Contributor II
Valued Contributor II

@DG1811 
Please edit your response or add a new comment with the working JSONs. 
It will help other people to refer this post.


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