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

Rest test connection worked properly once and now doesn't despite no config changes

jralexander137
Regular Contributor
Regular Contributor

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"
}
}
}

12 REPLIES 12

rushikeshvartak
All-Star
All-Star

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.‼️‼️⚠️


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

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.

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"}'

{
  "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"
    }
  }
}

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

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.

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'.

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"}'

Response please


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

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"}

{
  "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"
    }
  }
}

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

Same issue persists. No responses, errors, status codes returned.

Does it working with hardcoded access token


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