Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/14/2024 04:37 AM - edited 08/19/2024 01:32 AM
Hello,
we are trying to establish Sav4Sav connector connection but it is always failing...
We tried also via postman to check the access token, but it is also failing...
Here are the data which we use to connect:
ConnectionJSON
{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"httpHeaders": {
"Accept": "application/json"
},
"authError": [
"InvalidAuthenticationToken"
],
"url": "https://sav/api/login",
"httpMethod": "POST",
"httpContentType": "application/json",
"errorPath": "error.code",
"maxRefreshTryCount": 2,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"authHeaderName": "Authorization",
"accessToken": "Bearer ABCD",
"httpParams": "{\"username\":\"xxxx\",\"password\":\"xxx"}",
"retryFailureStatusCode": [
401
]
}
}
}
ImportUserJSON
{
"type": "multiCall",
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "https://sav/ECM/api/v5/getUser",
"httpMethod": "POST",
"httpParams": "{\"userQuery\":\"user.username is not null\"}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"userResponsePath": "results",
"colsToPropsMap": {
"username": "username~#~char",
"displayName": "displayname~#~char",
"customproperty10": "customproperty10~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "displaycount",
"batchSize": 50,
"totalCountPath": "completeResponseMap.total"
}
}
}
And in postman we always receive just
Error: Could not complete OAuth 2.0 token request
]
}
Thank you!
What we would like to do, to update the users and do some modifications in the users field, but it is not populated...
Solved! Go to Solution.
08/14/2024 04:39 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.‼️‼️⚠️
08/14/2024 04:59 AM
that is what we are sending to Get New Access Token:
08/14/2024 05:00 AM
Please send curl command in text format , along with API body response in screenshot
08/19/2024 01:36 AM - edited 08/19/2024 02:03 AM
there is nothing there... we have just those info which I already posted...there is no body:
POST /ECM/api/login HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: PostmanRuntime/7.28.3
Accept: */*
Cache-Control: no-cache
Postman-Token: xxx
Host: URL
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 123
grant_type=password&username=xxx&password=xxxa&client_id=&client_secret=
HTTP/1.1 400 Bad Request
Date: Mon, 19 Aug 2024 08:33:17 GMT
Content-Length: 0
Connection: keep-alive
Set-Cookie: xxx; P
ath=/;
Secure;
HttpOnly
CF-Cache-Status: DYNAMIC
Server: cloudflare
It says bad request... but we also didn't put anything as 'client_id' and 'client_secret', because I don't know what should we put there.
Here I also found that we need this info:
https://docs.saviyntcloud.com/bundle/REST-v2022x/page/Content/Examples-for-JSON-Construction.htm
08/19/2024 02:05 AM
curl --location 'https://rushi-eic-partner.saviyntcloud.com/ECM/api/login' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Cookie: INGRESSCOOKIE=1724058256.144.186.784451|0f4091fceac04271d9e9e5a60a3d3e8f; access_token=eyJhplpMsw; token_type=Bearer; user_name=admin' \
--data-raw '{
"username": "admin",
"password": "Rushi@Forum"
}'
08/19/2024 04:32 AM
Hi @userNM , client ID and secret is not required .. you will receive the access token with username password ..
Plus one other thing .. to perform all proper option for testing the account should have role admin sav role .
08/19/2024 05:54 AM
thank you! the user has SAV admin role...
@rushikeshvartak unfortunately Postman overwrites the Content-Type and puts it as ': application/x-www-form-urlencoded' ... that's why all the attempts to get token are failing....
08/19/2024 06:08 AM
08/20/2024 02:13 AM
so, you do not put any additional info in authorisation or headers?
because we cannot do it like in your sample:
-header 'Cookie: INGRESSCOOKIE=1724058256.144.186.784451|0f4091fceac04271d9e9e5a60a3d3e8f; access_token=eyJhplpMsw; token_type=Bearer; user_name=admin' \
For us they are separated...
we also found these posts:
https://forums.saviynt.com/t5/saviynt-knowledge-base/how-to-troubleshoot-401-unauthorized-error-from...
https://forums.saviynt.com/t5/saviynt-api/saviynt-api-best-practices/ta-p/36345
https://forums.saviynt.com/t5/identity-governance/reset-api-password-v-24/m-p/89312#M57900
but with OAuth2 we still receive rather 400 or 401...
08/20/2024 06:31 AM
try below postman package
Remove .txt
08/23/2024 12:57 AM
thank you this worked, the problem was we needed to test with the Bearer token on Postman which we took from Saviynt.