Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/27/2024 11:17 AM
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
Solved! Go to Solution.
08/27/2024 11:23 AM
08/27/2024 11:24 AM
08/27/2024 11:36 AM
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"
08/27/2024 11:54 PM
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
08/28/2024 12:04 AM
Share postman curl & screenshot
08/28/2024 12:11 AM
08/28/2024 12:21 AM
Curl ?
08/27/2024 11:40 AM
@DG1811
Can you also share the connection Json?
08/28/2024 12:23 AM - last edited on 08/28/2024 12:51 AM by Sunil
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]
08/28/2024 07:15 AM
@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"
}
}
}
08/28/2024 10:08 AM
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
08/28/2024 10:10 AM
Please share working JSON
08/28/2024 06:11 PM
@DG1811
Please edit your response or add a new comment with the working JSONs.
It will help other people to refer this post.