Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

REST CONNECTOR : Import Account Entitlement Mapping from XML Response using REST Connector

ssrnitish
New Contributor III
New Contributor III

Hi All,

We are facing issue in importing the Account Entitlement mapping from a XML Response using REST Connector. We are able to successfully import the Accounts and Entitlements from the XML Response but the Account-Entitlement Mapping is not working. 

Note: We cannot use the SOAP Connector due to certain limitations with the application API's because the Access Token can only be retrieved from a REST call.

We are using the ProcessingType as "acctToEntMapping" in the acctEntParams since we dont have any API's to return the memberships of the entitlements.

Below is the Sample XML Response (Removed unnecessary information in the response):

AccountUserID is the AccountID value in Saviynt and the entitlement information is present under the Roles attribute in the SOAP response and the Entitlement Value is the ObjectID parameter in the response.

<soap:Body>

<RetrieveResponseMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">

<OverallStatus>OK</OverallStatus>

<Results xsi:type="AccountUser">

<AccountUserID>715476331</AccountUserID>

<Email>Sigatest.user26@gmail.com</Email>

<Roles>

<Role>

<ObjectID>8978ff44-6e3e-e911</ObjectID>

<CustomerKey>10142749</CustomerKey>

<Name>Marketing Cloud Campaign Manager</Name>

</Role>

<Role>

<ObjectID>0da80a68-d303-eb11</ObjectID>

<CustomerKey>10182433</CustomerKey>

<Name>Marketing Cloud IT Support</Name>

</Role>

<Role>

<ObjectID>46283f5e-181a-ed11</ObjectID>

<CustomerKey>Individual role for 715476331</CustomerKey>

<Name>Individual role for 715476331</Name>

</Role>

</Roles>

</Results>

</RetrieveResponseMsg>

</soap:Body> 

 

Below is the JSON being used for Account-Entitlement Import

{

"accountParams": {

"connection": "userAuth",

"processingType": "SequentialAndIterative",

"call": {

"call1": {

"callOrder": 0,

"http": {

"url": "<<SOAP WSDL URL along with Request Payload>>",

"httpHeaders": {

"Content-Type": "text/xml"

},

"httpContentType": "text/xml",

"httpMethod": "POST"

},

"listField": "soap:Envelope.soap:Body.RetrieveResponseMsg.Results",

"keyField": "accountID",

"statusConfig": {

"active": "true",

"inactive": "false"

},

"colsToPropsMap": {

"name": "UserID~#~char",

"accountID": "AccountUserID~#~char",

"customproperty1": "Email~#~char",

"displayName": "Name~#~char",

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

}

}

},

"acctEntMappings": {

"Role": {

"listPath": "soap:Envelope.soap:Body.RetrieveResponseMsg.Results.Roles",

"idPath": "Role.ObjectID",

"keyField": "entitlementID"

}

}

},

"entitlementParams":{

"connection":"userAuth",

"processingType":"SequentialAndIterative",

"entTypes":{

"Role":{

"entTypeOrder":0,

"call":{

"call1":{

"callOrder":0,

"stageNumber": 0,

"http":{

"url":"<<SOAP WSDL URL along with Request payload>>",

"httpHeaders":{

"Content-Type": "text/xml"

},

"httpContentType":"text/xml",

"httpMethod":"POST"

},

"listField":"soap:Envelope.soap:Body.RetrieveResponseMsg.Results",

"keyField":"entitlementID",

"colsToPropsMap":{

"entitlementID":"ObjectID~#~char",

"entitlement_value":"ObjectID~#~char",

"displayname":"Name~#~char"

}

}

}

}

}

},

"acctEntParams": {

"processingType": "acctToEntMapping"

}

}

 

Other details if needed:

Job is completing successfully without any errors but Customproperty31 is not getting populated during import. It is having empty {} after import job is completed.

Also under the "acctEntMappings", we tried passing below different values but none of them seems to be working.

listPath -> soap:Envelope.soap:Body.RetrieveResponseMsg.Results.Roles  /  Results.Roles   /  Roles

idPath -> Role.ObjectID  /   ObjectID

keyField ->  entitlementID / entitlement_value

Attached both the JSON and soap response in the ticket for reference. Any help or pointers in parsing the response will be much appreciated. 

Thanks,

Nitish

6 REPLIES 6

rushikeshvartak
All-Star
All-Star

check if below post helps you 

https://forums.saviynt.com/t5/identity-governance/rest-connector-importaccountentjson-with-text-xml-... 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi @rushikeshvartak ,

Thanks for the reply. I have converted the xml to json using the converter and below is my json response from which we are trying to read the roles information.

{
"Envelope": {
     "Body": {
             "RetrieveResponseMsg": {
                                 "Results": {
                                         "AccountUserID": "715476331",
                                         "Name": "SIGATEST User26",
                                         "Email": "Sigatest.user26@gmail.com",
                                         "Roles": {
                                               "Role": [
                                                       {
                                                              "ObjectID": "8978ff44-6e3e-e911-a2d5-1402ec8ca151",
                                                              "Name": "Campaign Manager"
                                                        },
                                                        {
                                                               "ObjectID": "0da80a68-d303-eb11-b81b-1402ec938fc9",
                                                               "Name": "IT Support"
                                                        }
                                               ]
                                       }
                             }
                    }
             }
      }
}

 

I updated the "acctEntMappings" configuration inside the accountParams and tried with below all combinations, but still the account Entitlement association is not working.  Also, the customproperty31 after running full account import job is populated with empty data value -> {"data:":"empty"}

Error: 2022-08-22/13:56:44.995 [{}] [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService - Exception in RestProvisioingService.getAccEntTypeMappingInfoAsjson :
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'soap:Envelope.soap:Body.RetrieveResponseMsg.Results.Roles.Role' with class 'java.lang.String' to class 'java.util.Map'

ssrnitish_1-1661178256686.png

Tried with below different ways, but all of them are giving the same error.

"acctEntMappings": {
"listPath": "Roles",
"idPath": "Role.ObjectID",
"keyField": "entitlementID"
}

"acctEntMappings": {
"listPath": "soap:Envelope.soap:Body.RetrieveResponseMsg.Results.Roles",
"idPath": "Role.ObjectID",
"keyField": "entitlementID"
}

"acctEntMappings": {
"listPath": "soap:Envelope.soap:Body.RetrieveResponseMsg.Results.Roles",
"idPath": "soap:Envelope.soap:Body.RetrieveResponseMsg.Results.Roles.Role.ObjectID",
"keyField": "entitlementID"
}

"acctEntMappings": {
"listPath": "Roles.Role",
"idPath": "ObjectID",
"keyField": "entitlementID"
}

"acctEntMappings": {
"listPath": "soap:Envelope.soap:Body.RetrieveResponseMsg.Results.Roles.Role",
"idPath": "ObjectID",
"keyField": "entitlementID"
}

Attached ImportAccountEntJSON for reference. 

 

Thanks,

Nitish

Customproperty31 of account updated ? can you attach logs


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

ssrnitish
New Contributor III
New Contributor III

Hi,

Customproperty31 is getting updated below empty data value -> {"data:":"empty"}. Attached account import Logs 

ssrnitish_0-1661182302969.png

 

"acctEntMappings": {
"Roles": {
"listPath": "Roles.Role.ObjectID",
"idPath": "",
"keyField": "entitlementID"
}


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Thanks @rushikeshvartak  for your help.

The above configuration is working perfectly good now and able to reconcile association between accounts and entitlemetns. May i get some more insights on how you configured the listPath?

I have been trying with only "Roles.Role" which is a arrayList under listPath.

Thanks,

Nitish