Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/18/2024 07:39 AM
Hi I am working with the OOTB rest connection. Below is the connectionJson we just configured, hit test connection, and saw user objects returned as shown in the attached logs. The problem is that every time we run it now, we get no errors, no status codes, and no objects returned. Any idea why this might be? Obviously the connectionJson is fine if it worked once, it should work every time.
logs_test_connection_worked.csv - this is the log that shows the successfull test connection, the others show the subsequent tests
ConnectionJson
{
"authentications": {
"userAuth": {
"authType": "oauth2",
"url": "https://tgt.domain.com:8442/security/v2.1/domains/Main/applications/UMS/user/token",
"httpMethod": "POST",
"httpParams": {
"grant_type": "password",
"username": "removed",
"password": "removed"
},
"httpHeaders": {
"contentType": "application/x-www-form-urlencoded"
},
"httpContentType": "application/x-www-form-urlencoded",
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"InvalidAuthenticationToken"
],
"timeOutError": "Read timed out",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"accessToken": "Bearer abc"
},
"testConnectionParams": {
"http": {
"url": "https://tgt.domain.com:8442/security/v2.1/domains/Main/applications/tm/users",
"httpHeaders": {
"Authorization": "${accessToken}"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},"successResponses": {
"statusCode": [
200
]
},
"successResponsePath": "",
"errors": [
"Couldn't authenticate you"
],
"errorPath": "error"
}
}
}
06/18/2024 11:15 AM
It was not even success. as there is no successResponsePath define
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.‼️‼️⚠️
06/18/2024 12:28 PM
The log I attached shows it works. There are records returned in the log,
but subsequent test connections don't return any. We looked back at logs from the past 7 days and are seeing similar results, there is like 1 or 2 times each day where test connection gets the response with user records. Other times it doesn't. If we hard code a bearer token we see a consistent resposne but we should not have to do that. The connectionJson I provided does work, otherwise we would not see ANY records returned at any point, not just occasionally with no errors, responses, or status codes.
06/18/2024 12:41 PM
Here is the curl: curl --location 'https://tgt.domain.com:8442/security/v2.1/domains/Main/applications/UMS/user/token?grant_type=passwo... --header 'Content-Type: application/json' --data '{"username": "xxxxxxxxx","password": "xxxxxxxxx"}'
06/18/2024 08:26 PM
{
"authentications": {
"userAuth": {
"authType": "oauth2",
"url": "https://tgt.domain.com:8442/security/v2.1/domains/Main/applications/UMS/user/token",
"httpMethod": "POST",
"httpParams": {
"grant_type": "password",
"username": "removed",
"password": "removed"
},
"httpHeaders": {
"contentType": "application/json"
},
"httpContentType": "application/json",
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"InvalidAuthenticationToken"
],
"timeOutError": "Read timed out",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"accessToken": "Bearer abc"
},
"testConnectionParams": {
"http": {
"url": "https://tgt.domain.com:8442/security/v2.1/domains/Main/applications/tm/users",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"successResponses": {
"statusCode": [
200
]
},
"successResponsePath": "",
"errors": [
"Couldn't authenticate you"
],
"errorPath": "error"
}
}
}
06/19/2024 05:30 AM
This config just gives the same results I've been seeing. Test connection completes successfully in UI, I see no records returned, no status code, no error, no response body, etc.
06/19/2024 06:30 AM
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.‼️‼️⚠️
06/19/2024 06:32 AM
Shared it above already: curl --location 'https://tgt.domain.com:8442/security/v2.1/domains/Main/applications/UMS/user/token?grant_type=passwo... --header 'Content-Type: application/json' --data '{"username": "xxxxxxxxx","password": "xxxxxxxxx"}'
06/19/2024 06:36 AM
Response please
06/19/2024 08:12 AM
Here you go:
command:
curl --location 'https://tgt.domain.com:8442/security/v2.1/domains/Main/applications/UMS/user/token?grant_type=passwo... --header 'Content-Type:application/json' --data '{"username":"username","password":"password' -k --insecure
response:
{"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJTVkNfU2F2aXludERldl90b19JRyIsInVpZCI6MjIyLCJmaXJzdG5hbWUiOiJTVkNfU2F2aXludERldl90b19JR1QiLCJpZ3RfdXNlcl90eXBlIjoiU0VSVklDRV9BQ0NPVU5UIiwiZG9tYWluIjoiY2Njci5jb20iLCJpc3MiOiJodHRwczovLzEwLjEyOS4xLjc1Ojg0NDIvc2VjdXJpdHkvdjIuMSIsInNlc3Npb25faWQiOiJmNDA5NzAzNTJlNDkxMWVmOGZhNzAyNDJhYzEyMDAwNiIsImV4cCI6MTcxODgxMTY2MywiaWd0X2lkcCI6IkNDQ1IiLCJpYXQiOjE3MTg4MDgwNjMsInBybiI6IlNWQ19TYXZpeW50RGV2X3RvX0lHIiwibGFzdG5hbWUiOiJTVkNfU2F2aXludERldl90b19JR1QifQ.prtQ2J0JuFdc9XTIvdrDc8YFZ8ZJCbDTLKu6s65L2Bg","token_type":"Bearer","expires_in":3600,"refresh_token":"f40aa8b62e4911ef8fa70242ac120006"}
06/19/2024 10:29 PM
{
"authentications": {
"userAuth": {
"authType": "Oauth2",
"url": "https://tgt.domain.com:8442/security/v2.1/domains/Main/applications/UMS/user/token?grant_type=password",
"httpMethod": "POST",
"httpParams": {
"username": "removed",
"password": "removed"
},
"httpHeaders": {
"contentType": "application/json"
},
"httpContentType": "application/json",
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"InvalidAuthenticationToken"
],
"timeOutError": "Read timed out",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"accessToken": "Bearer abc"
},
"testConnectionParams": {
"http": {
"url": "https://tgt.domain.com:8442/security/v2.1/domains/Main/applications/tm/users",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"successResponses": {
"statusCode": [
200
]
},
"successResponsePath": "",
"errors": [
"Couldn't authenticate you"
],
"errorPath": "error"
}
}
}
06/20/2024 04:45 AM
06/20/2024 06:00 AM
Does it working with hardcoded access token