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

Concate of two target attributes in REST entitlement Import JSON is not working

Rajesh_CH
New Contributor
New Contributor

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.

 

24 REPLIES 24

NM
Esteemed Contributor
Esteemed Contributor

Hi @Rajesh_CH , do you want to cconcat all the entitlement name into one?


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

Rajesh_CH
New Contributor
New Contributor

@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

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"

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

@rushikeshvartak I used the same syntax, but still its not working.

Does CP1 & CP2 is populated for entitlement ?


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

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

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

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

@rushikeshvartak I tried with above shared JSON, still its not working as expected.

 

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


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

NM
Esteemed Contributor
Esteemed Contributor

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


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

Rajesh_CH
New Contributor
New Contributor

@NM Tried with above mentioned JSON, but still not working 

Vedanth-BK
Regular Contributor II
Regular Contributor II

Hello Rajesh 

please try the below 

 

"entitlement_value": "#CONST#${response.name!= null? response.name +' '+ response.applicationName : null}~#~char",

 

Thank you
Vedanth B.K
If you find my response helpful and it works, Hit the 'Kudos' button and accept it as a solution!!

@Vedanth-BK I tried this syntax also, but still access import is not working.
debug logs attached.

Share postman details & validate connection JSON


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

Vedanth-BK
Regular Contributor II
Regular Contributor II

it's an auth issue 

responseStatusCode ::401

Thank you
Vedanth B.K
If you find my response helpful and it works, Hit the 'Kudos' button and accept it as a solution!!

Usually token is generated from POST method. Can you share postman screenshot of authentication API


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

@rushikeshvartak @Vedanth-BK 

Rajesh_CH_0-1723644918534.png

[This message has been edited by moderator to mask sensitive information]

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

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

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

 

Thank you
Vedanth B.K
If you find my response helpful and it works, Hit the 'Kudos' button and accept it as a solution!!

NM
Esteemed Contributor
Esteemed Contributor

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

}


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

Rajesh_CH
New Contributor
New Contributor

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

Rajesh_CH_0-1723793915736.png
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'

Rajesh_CH_1-1723794372409.png

 

"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "name~#~char",
"customproperty2": "applicationName~#~char",


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

Vedanth-BK
Regular Contributor II
Regular Contributor II

@Rajesh-R pls share the entmappingparams

Thank you
Vedanth B.K
If you find my response helpful and it works, Hit the 'Kudos' button and accept it as a solution!!