We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Rest Connector: String Operation in idpath

Sivagami
Valued Contributor
Valued Contributor

I have a rest app where entitlement is actually a combination of 2 attributes in the response (name || resource). I'm able to combine the attribute values and assign it to entitlementID and entitlement_value but the mapping between the account and entitlement is not happening. I have put the id path same as the logic in entitlementID but CP31 of accounts table is not getting populated due to which the relationship between account and entitlement is not established. Appreciate the assistance to resolve the mapping issue.

serviceRole1 || microservicename1

serviceRole1 || microservicename2

serviceRole2 || microservicename1

serviceRole2 || microservicename2

API Response

{
	"results":[
	{
            "user": {
                "userId": "b9ecf1f17a6f",
                "idpId": "mydomain.com",
                "email": "myuser@mydomain.com",
                "username": "myuser@domain.com"
            },
            "serviceRoles": [
                {
                    "serviceRoles": [
                        {
                            "name": "serviceRole1",
                            "membershipType": "DIRECT",
                            "resource": "microservicename1"
                        },
                        {
                            "name": "serviceRole1",
                            "membershipType": "DIRECT",
                            "resource": "microservicename2"
                        },
                        {
                            "name": "serviceRole2",
                            "membershipType": "DIRECT",
                            "resource": "microservicename1"
                        },
                        {
                            "name": "serviceRole2",
                            "membershipType": "DIRECT",
                            "resource": "microservicename2"
                        }
                    ]
                }
            ],
            "customRoles": []
        }
	]
}

ImportAccountEntJson

{
  "accountParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "statusAndThresholdConfig": {
      "accountsNotInImportAction": "Suspend",
      "accountThresholdValue": 1000
    },
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "https://myapp.mydomain.com/api/users?pageStart=0&pageLimit=200",
          "httpContentType": "application/json",
          "httpMethod": "GET",
          "httpHeaders": {
            "Accept": "application/json",
            "token": "${access_token}"
          }
        },
        "listField": "results",
        "keyField": "accountID",
        "colsToPropsMap": {
          "accountID": "user.userId~#~char",
          "name": "user.email~#~char",
          "customproperty1": "user.idpId~#~char",
          "description": "user.username~#~char",
          "customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
        },
        "pagination": {
          "nextUrl": {
            "nextUrlPath": "${response?.completeResponseMap?.nextLink==null?null:('https://myapp.mydomain.com'+response.completeResponseMap.nextLink)}"
          }
        }
      }
    },
    "acctEntMappings": {
      "Service Roles": {
        "importAsEntitlement": true,
        "listPath": "serviceRoles[0].serviceRoles",
        "idPath": "#CONST#${String d1 = response.name; String d2 = response.resource; ret = d1 + \" || \" + d2; if(d2.equals(null)){return d1} else{return ret}}",
        "keyField": "entitlementID",
        "colsToPropsMap": {
          "entitlementID": "#CONST#${String d1 = response.name; String d2 = response.resource; ret = d1 + \" || \" + d2; if(d2.equals(null)){return d1} else{return ret}}~#~char",
          "entitlement_value": "#CONST#${String d1 = response.name; String d2 = response.resource; ret = d1 + \" || \" + d2; if(d2.equals(null)){return d1} else{return ret}}~#~char",
          "customproperty1": "name~#~char",
          "customproperty2": "resource~#~char"
        }
      }
    }
  },
  "entitlementParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "entTypes": {
      "Service Roles": {}
    }
  },
  "acctEntParams": {
    "processingType": "acctToEntMapping"
  }
}

-Siva

 

3 REPLIES 3

Sivagami
Valued Contributor
Valued Contributor

Update: Heard from one of the saviynt engineers that the string operation in idpath is not supported.

Logged an enhancement request in ideas portal: https://ideas.saviynt.com/ideas/EIC-I-3803 

Anyone with similar requirement, vote for the idea to get some traction from saviynt team.

-Siva

Martin
New Contributor II
New Contributor II

Hello,

It is possible to put compute the value of CP31 instead of

 

  "customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"

 

like this for example :

 

 "customproperty31":"#CONST#${'{\"groups\":{\"entIds\":' + response.roles.userRole.collect{\"\\\"\"+it.role.shortname+' | '+it.scope.name+\"\\\"\"}.toString() + ',\"keyField\":\"entitlementID\"}}'}~#~char"

 

Hope this helps.

 

Regards,

SANSOUCY Martin

 

IAM_99
Regular Contributor II
Regular Contributor II

Hi , Any one tried this ?