Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/14/2024 04:01 AM - edited 08/14/2024 04:14 AM
Hello,
I was trying to run access import in REST connection through below JSON, but its not working and entitlements are not imported to saviynt.
{
"accountParams": {},
"entitlementParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {
"entTypeOrder": 1,
"call": {
"call1": {
"callOrder": 1,
"stageNumber": 1,
"http": {
"url": "xxxxxxxxxxx",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "*/*",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "#CONST#${String data1 = response.groups.applicationName; String data2 = response.groups.name; ret = data1 + \"_\" + data2; return ret}~#~char",
"customproperty1": "name~#~char",
"customproperty2": "applicationName~#~char",
"description": "description~#~char",
"status": "active~#~boolean"
}
}
}
}
}
},
"acctEntParams": {}
}
Attached sample get groups response.
please review and help me to resolve this issue.
08/14/2024 04:21 AM
Hi @Rajesh_CH , do you want to cconcat all the entitlement name into one?
08/14/2024 04:34 AM - edited 08/14/2024 04:35 AM
@NM I want to concat applicationName and name as entitlement value into saviynt.
Ex: "id": "1",
"name": "Administrator",
"description": "Administrator for App Feedback",
"active": true,
"applicationName": "App Feedback"
I want to import entitlement value as App Feebank_Administrator into saviynt
08/14/2024 04:37 AM
Refer https://forums.saviynt.com/t5/identity-governance/rest-string-functions/m-p/9161#M1562
"customproperty7": "#CONST#${String data1 = response.groups.applicationName; String data2 = response.groups.name; ret = data1 + \" \" + data2; return ret}~#~char"
08/14/2024 04:48 AM
@rushikeshvartak I used the same syntax, but still its not working.
08/14/2024 04:51 AM
Does CP1 & CP2 is populated for entitlement ?
08/14/2024 05:03 AM
@rushikeshvartak Entitlements are not imported to saviynt. I see access import job status is success, but entitlements are not imported to saviynt and only entitlement type created in endpoint.
08/14/2024 05:07 AM
{
"accountParams": {},
"entitlementParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {
"entTypeOrder": 1,
"call": {
"call1": {
"callOrder": 1,
"stageNumber": 1,
"http": {
"url": "xxxxxxxxxxx",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "*/*",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "groups",
"keyField": "id",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "#CONST#${String data1 = response.groups.applicationName; String data2 = response.groups.name; ret = data1 + \"_\" + data2; return ret}~#~char",
"customproperty1": "name~#~char",
"customproperty2": "applicationName~#~char",
"description": "description~#~char",
"status": "active~#~boolean"
}
}
}
}
}
},
"acctEntParams": {}
}
08/14/2024 05:16 AM - edited 08/14/2024 05:26 AM
@rushikeshvartak I tried with above shared JSON, still its not working as expected.
08/14/2024 05:24 AM
Need Postman details for Entitlement API
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:38 AM
@Rajesh_CH try this
{
"accountParams": {},
"entitlementParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {
"entTypeOrder": 1,
"call": {
"call1": {
"callOrder": 1,
"stageNumber": 1,
"http": {
"url": "xxxxxxxxxxx",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "*/*",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "groups",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "#CONST#${String data1 = response.applicationName; String data2 = response.name; String ret = data1 + '_' + data2; return ret;}~#~char",
"customproperty1": "name~#~char",
"customproperty2": "applicationName~#~char",
"description": "description~#~char",
"status": "active~#~boolean"
}
}
}
}
}
},
"acctEntParams": {}
}
08/14/2024 04:53 AM
@NM Tried with above mentioned JSON, but still not working
08/14/2024 06:16 AM
Hello Rajesh
please try the below
"entitlement_value": "#CONST#${response.name!= null? response.name +' '+ response.applicationName : null}~#~char",
08/14/2024 06:26 AM - edited 08/14/2024 06:28 AM
@Vedanth-BK I tried this syntax also, but still access import is not working.
debug logs attached.
08/14/2024 06:34 AM - edited 08/14/2024 06:37 AM
Share postman details & validate connection JSON
08/14/2024 06:36 AM
it's an auth issue
responseStatusCode ::401
08/14/2024 07:08 AM - edited 08/14/2024 07:31 AM
08/14/2024 07:09 AM
Usually token is generated from POST method. Can you share postman screenshot of authentication API
08/14/2024 07:15 AM - last edited on 08/18/2024 07:59 AM by Sunil
[This message has been edited by moderator to mask sensitive information]
08/14/2024 07:19 AM
Use below json
{
"authentications": {
"userAuth": {
"authType": "Oauth2",
"showResponse": true,
"url": "https://XXXXc.net/Saviynt_API/Token/generate-token",
"httpMethod": "GETWITHBODY",
"httpHeaders": {
"Accept": "*/*",
"Content-Type": "application/x-www-form-urlencoded"
},
"httpContentType": "application/x-www-form-urlencoded",
"httpParams": {
"Authorization": "Bearer XXXXXXXXXXXXX"
},
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed",
"FAILURE",
"INVALID_SESSION_ID"
],
"timeOutError": "Read timed out",
"errorPath": "errors.type",
"maxRefreshTryCount": 5,
"tokenResponsePath": "accessToken",
"tokenType": "Bearer",
"accessToken": "Bearer abcd",
"successResponses": {
"statusCode": [
200,
201,
202,
203,
204,
205
]
}
}
}
}
08/14/2024 07:30 AM
Hello @Rajesh_CH
please try with the below connection json.
{
"authentications": {
"userAuth": {
"authType": "Oauth2",
"showResponse": true,
"url": "https://XXXXc.net/Saviynt_API/Token/generate-token",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "Bearer XXXXXXXXXXXXX",
"Content-Type": "application/x-www-form-urlencoded"
},
"httpContentType": "application/x-www-form-urlencoded",
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed",
"FAILURE",
"INVALID_SESSION_ID"
],
"retryFailureStatusCode": [
401
],
"timeOutError": "Read timed out",
"errorPath": "errors.type",
"maxRefreshTryCount": 5,
"tokenResponsePath": "accessToken",
"tokenType": "Bearer",
"accessToken": "Bearer abcd"
}
}
}
08/14/2024 06:03 AM - edited 08/14/2024 06:32 AM
@Rajesh_CH try this
{
"accountParams": {},
"entitlementParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {
"entTypeOrder": 1,
"call": {
"call1": {
"callOrder": 1,
"stageNumber": 1,
"http": {
"url": "xxxxxxxxxxx",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "*/*",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "groups",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "#CONST#${String ret= response.applicationName+'_'+response.response.nane; return ret:}~#~char",
"customproperty1": "name~#~char",
"customproperty2": "applicationName~#~char",
"description": "description~#~char",
"status": "active~#~boolean"
}
}
}
}
}
},
"acctEntParams": {}
}
08/16/2024 12:46 AM
@rushikeshvartak and @Vedanth-BK Thank you. Connection JSON is working fine now.
But still entitlement import JSON is not working as expected. when I run access import, I could see contact is not working properly means all application names are concating with app roles IDs in single entitlement name as below.
But my requirement is entitlememng name should import to saviynt as like AppName_id1, AppName_id2, AppName_Id3.
Here is the Curl command response
curl --location --request GET '
https:xxxxxxxx/rest/BPopProvisioning/GetGroups?p_filter_property=Name&p_filter_operator=eq&p_filter_value=Administrator'
\
--header 'Accept: text/plain' \
--header 'Authorization: Bearer eyJhbGciOiJIUxxxxxxxxxxxxN28_zxlmcKw7Z4_ztJuA'
08/16/2024 07:02 AM
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "name~#~char",
"customproperty2": "applicationName~#~char",
08/16/2024 02:04 AM
@Rajesh-R pls share the entmappingparams