Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/04/2024 12:56 AM
Hi,
I am working on the use case for the sav4sav connector and the use case is I need to configure the importaccountentjson so the account type should get updated to the service account after importing the data through sav4sav. For example, I have AD accounts and through analytics, I'm accessing the account data so If firstname=xyz then account type = service account. For analytics, should I create it with SQL query/ data query/ runtime analytics? I have mentioned the ImportAccountEntJSON
{
"accountParams": {
"connection": "accAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"accountThresholdValue": 50,
"statusColumn": "status",
"activeStatus": [
"1"
],
"deleteLinks": false,
"accountsNotInImportAction": "Suspend"
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xyz.com/ECM/api/v5/fetchRuntimeControlsData",
"httpParams": "{\"analyticsname\": \"AccountImport\"}",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json"
},
"listField": "result",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "AccountID~#~char",
"name": "AccountName~#~char",
"status": "status1~#~char"
}
}
}
},
"entitlementParams": {},
"acctEntParams": {}
}
07/04/2024 01:47 AM
Hi @Mortal ,
Make sure to add one more column in you query which will define the type of account based on your firstname condition as you mentioned about and map that column to accountType in your importaccountentjson like below.
{
"accountParams": {
"connection": "accAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"accountThresholdValue": 50,
"statusColumn": "status",
"activeStatus": [
"1"
],
"deleteLinks": false,
"accountsNotInImportAction": "Suspend"
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xyz.com/ECM/api/v5/fetchRuntimeControlsData",
"httpParams": "{\"analyticsname\": \"AccountImport\"}",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json"
},
"listField": "result",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "AccountID~#~char",
"name": "AccountName~#~char",
"accountType":"AccountType~#~char",
"status": "status1~#~char"
}
}
}
},
"entitlementParams": {},
"acctEntParams": {}
}
07/04/2024 02:01 AM
@pmahalle what should be the condition and where do we need to put it?
07/04/2024 02:54 AM
hi @Mortal create the analytics as a runtime analytics query.
Also. if you requirement is to just update the account type based on a condition, you can also use enhanced query execution in which case, the savForSav is not required.
07/04/2024 02:58 AM
@Mortal In you analytics query. Provide your query here.
07/04/2024 05:19 AM
@Mortal ,
As mentioned by Naveen If you want to just change the account type of accounts then you can use enhanced query for that rather that SAV4SAV. Below is the sample enhanced query which will set account type as service account for account's having customproperty1 start with string first.
select accountkey as accounts__primarykey,case when customproperty1 like '%first%' then 'Service Account' else null end as accounts__accounttype from accounts where customproperty1 is not null limit 1;
07/04/2024 06:11 AM
@naveenss @pmahalle We cannot perform this action with an enhance query because there might be multiple service accounts that why we are trying with the sav4sav connector.
Currently I was trying with one account and I created runtime analytics as for this the query as follows:
select a.accountkey, a.accountID, a.name, a.status as status1, 'Service Account' as accounttype FROM ACCOUNTS A, ENDPOINTS E WHERE A.ENDPOINTKEY = E.ENDPOINTKEY and e.ENDPOINTKEY=5 and a.status IN (1,'active') and a.accountkey =1613962
I am getting the result from above query but the job is failing with error msg Failed url-https://xyz/ECM/api/v5/fetchRuntimeControlsDataV2 with Error Message-null and in log viewer
org.joda.time.IllegalFieldValueException: Value 24 for hourOfDay must be in the range [0,23] at org.joda.time.field.FieldUtils.verifyValueBounds(FieldUtils.java:234) at org.joda.time.field.PreciseDateTimeField.set(PreciseDateTimeField.java:112) at org.joda.time.chrono.BaseChronology.getDateTimeMillis(BaseChronology.java:163) at org.joda.time.chrono.AssembledChronology.getDateTimeMillis(AssembledChronology.java:151) at org.joda.time.chrono.AssembledChronology.getDateTimeMillis(AssembledChronology.java:148) at org.joda.time.LocalTime.<init>(LocalTime.java:506) at org.joda.time.LocalTime.<init>(LocalTime.java:450) at net.redhogs.cronparser.DateAndTimeUtils.formatTime(DateAndTimeUtils.java:57) at net.redhogs.cronparser.DateAndTimeUtils.formatTime(DateAndTimeUtils.java:26) at net.redhogs.cronparser.builder.HoursDescriptionBuilder.getSingleItemDescription(HoursDescriptionBuilder.java:23) at net.redhogs.cronparser.builder.AbstractDescriptionBuilder.getSegmentDescription(AbstractDescriptionBuilder.java:28) at net.redhogs.cronparser.CronExpressionDescriptor.getHoursDescription(CronExpressionDescriptor.java:174) at net.redhogs.cronparser.CronExpressionDescriptor.getTimeOfDayDescription(CronExpressionDescriptor.java:220) at net.redhogs.cronparser.CronExpressionDescriptor.getFullDescription(CronExpressionDescriptor.java:241) at net.redhogs.cronparser.CronExpressionDescriptor.getDescription(CronExpressionDescriptor.java:62) at net.redhogs.cronparser.CronExpressionDescriptor.getDescription(CronExpressionDescriptor.java:39) at com.saviynt.ecm.utility.domain.FlatViewJobcontrolController$_closure5_closure78.doCall(FlatViewJobcontrolController.groovy:335) at com.saviynt.ecm.utility.domain.FlatViewJobcontrolController$_closure5.doCall(FlatViewJobcontrolController.groovy:314) at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53) at com.saviynt.webservice.SaviyntRestAuthenticationFilter.doFilter(SaviyntRestAuthenticationFilter.groovy:159) at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:62) at grails.plugin.springsecurity.web.SecurityRequestHolderFilter.doFilter(SecurityRequestHolderFilter.java:59) at com.mrhaki.grails.plugin.xframeoptions.web.XFrameOptionsFilter.doFilterInternal(XFrameOptionsFilter.java:69) at com.brandseye.cors.CorsFilter.doFilter(CorsFilter.java:82) at java.lang.Thread.run(Thread.java:750)
07/04/2024 07:21 AM
Error is not related to job
07/04/2024 08:55 AM
@rushikeshvartak , Sorry for sharing an invalid error. I've attached the log file of the error.
07/04/2024 09:16 AM
You have issue with connection JSON
07/04/2024 09:29 AM
currently following connection JSON in use. Is that issue referring to the URL by any chance? Or do I need to add some additional fields to it?
{
"authentications": {
"userAuth": {
"authType": "oauth2",
"url": "xyz.com/ECM/api/login",
"httpMethod": "POST",
"httpParams": "{\"username\": \"abc\",\"password\": \"abc\"}",
"httpContentType": "application/json",
"httpHeaders": {
"Content-Type": "application/json"
},
"authError": [
"USER_AUTHENTICATION_FAILED",
"PARTNER_AUTHENTICATION_FAILED",
"AuthenticationFailed"
],
"errorPath": "errorCode",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"authHeaderName": "Authorization",
"accessToken": "Bearer abcd",
"retryFailureStatusCode": [
401
]
}
}
}
07/04/2024 04:35 PM
Your connection name in connection json is
userAuth
and in account import acctAuth
Make it consistent
07/04/2024 10:01 PM
even after making it consistent on both sides, still getting errors and for the job getting an error message is null
07/04/2024 11:05 PM
Share logs
07/05/2024 12:29 AM
@rushikeshvartak I figured out the issue for the SAV4SAV, for the URL there is SSO present and because of this, I could not make API calls. I changed the URL which does not have SSO enabled and now the job is successful but I was unable to update the account type as a service account using the below query
select a.accountkey, a.accountID, a.name, a.status as status1, 'Service Account' as accounttype FROM ACCOUNTS A, ENDPOINTS E WHERE A.ENDPOINTKEY = E.ENDPOINTKEY and e.ENDPOINTKEY=5 and a.status IN (1, 'active') and a.accountkey =1613962
07/05/2024 01:07 AM
@Mortal , Try below query in your enhanced query job.
select a.accountkey as accounts__primarykey, 'Service Account' as accounts__accounttype FROM ACCOUNTS A, ENDPOINTS E WHERE A.ENDPOINTKEY = E.ENDPOINTKEY and e.ENDPOINTKEY=5 and a.status IN (1, 'active') and a.accountkey =1613962
07/05/2024 07:02 AM - edited 07/05/2024 07:02 AM
select a.accountkey as accounts__primarykey,
, 'Service Account' as accounts__accounttype FROM ACCOUNTS a where a.accountkey =1613962
07/05/2024 12:40 AM
Hi @Mortal , share updated importaccountentjson
07/05/2024 12:48 AM
@NM currently using the following ImportAccountEntJSON
{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"statusColumn": "status",
"activeStatus": [
1
],
"deleteLinks": false,
"accountThresholdValue": 10000,
"correlateInactiveAccounts": false,
"inactivateAccountsNotInFile": false,
"deleteAccEntForActiveAccounts": false
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "xyz.com/ECM/api/v5/fetchControlDetailsES?analyticsid=1489",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "results",
"keyField": "accountID",
"colsToPropsMap": {
"accountkey": "AccountKey~#~char",
"accountID": "AccountID~#~char",
"name": "AccountName~#~char",
"status": "active~#~char",
"accounttype":"AccountType~#~char"
}
}
}
},
"entitlementParams": {},
"acctEntParams": {}
}