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

Why is account import failing even though CP31 is successfully set to correct role

ZA
New Contributor III
New Contributor III

So even thought customproperty31 is showing the correct role the user has, the import job is failing and I cannot figure out why.

ImportAccountJSON:

 

 

{
  "accountParams": {
    "connection": "acctAuth",
    "createUsers": false,
    "processingType": "SequentialAndIterative",
    "successResponses": {
      "statusCode": [
        200
      ]
    },
    "doNotChangeIfFailed": true,
    "statusAndThresholdConfig": {
      "accountsNotInImportAction": "Suspend",
      "accountThresholdValue": 1000,
      "deleteAccEntForActiveAccounts": true,
      "statusColumn": "customproperty6"
    },
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "https://sb-xxxx-1.gainsightcloud.com/v1/users/services/list",
          "httpContentType": "application/json",
          "httpMethod": "POST",
          "httpHeaders": {
            "Accept": "application/json",
            "accesskey": "${access_token}"
          },
          "httpParams": "{\"includeTotal\": true, \"limit\": 10000, \"page\": 0, \"orderBy\": { \"ModifiedDate\": \"desc\" }, \"select\": [\"Name\", \"SFDCUserName\", \"Email\", \"IsSuperAdmin\", \"ModifiedDate\", \"LicenseType\"]}"
        },
        "listField": "data.users",
        "keyField": "accountID",
        "colsToPropsMap": {
          "accountID": "SFDCUserName~#~char",
          "name": "SFDCUserName~#~char",
          "displayname": "Name~#~char",
          "customproperty4": "Email~#~char",
          "customproperty5": "Gsid~#~char",
          "customproperty6": "Status~#~char",
                    "customproperty7": "IsSuperAdmin~#~bool",
          "customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
        },
        "pagination": {
          "offset": {
            "offsetParam": "page",
            "batchParam": "limit",
            "batchSize": 10000,
            "totalCountPath": "data.total"
          }
        }
      }
    },
    "acctEntMappings": {
      "LicenseType": {
        "importAsEntitlement": true,
        "listPath": "",
        "idPath": "LicenseType",
        "keyField": "entitlementID",
        "colsToPropsMap": {
          "entitlementID": "LicenseType~#~char",
          "entitlement_value": "LicenseType~#~char"
        }
      }
    }
  },
  "entitlementParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "successResponses": {
      "statusCode": [
        200
      ]
    },
    "doNotChangeIfFailed": true,
    "entTypes": {
      "LicenseType": {
        "entTypeOrder": 0,
        "call": {
          "call1": {
            "connection": "acctAuth",
            "callOrder": 0,
            "stageNumber": 0,
            "http": {
              "httpHeaders": {
                "Accept": "application/json",
                "accesskey": "${access_token}"
              },
          "httpParams": "{\"includeTotal\": true, \"limit\": 10000, \"page\": 0, \"orderBy\": { \"ModifiedDate\": \"desc\" }, \"select\": [\"Name\", \"SFDCUserName\", \"Email\", \"IsSuperAdmin\", \"ModifiedDate\", \"LicenseType\"]}",
              "url": "https://sb-xxxx-1.gainsightcloud.com/v1/users/services/list",
              "httpContentType": "application/json",
              "httpMethod": "POST"
            },
            "listField": "data.users",
            "keyField": "entitlementID",
            "colsToPropsMap": {
              "entitlementID": "LicenseType~#~char


",
              "entitlement_value": "LicenseType~#~char"
            },
            "disableDeletedEntitlements": true
          }
        }
      }
    }
  },
  "acctEntParams": {
    "processingType": "acctToEntMapping"
  }
}

 

 

Custom Property 31 is being successfully set to:

{"LicenseType":{"entIds":["Full"],"keyField":"entitlementID"}}

Sample response:

 

 

{
	"result": true,
	"errorCode": null,
	"errorDesc": null,
	"localizedErrorDesc": null,
	"requestId": "42094dda-eb7a-4cb1-9595-54ebea668f33",
	"data": {
		"page": 0,
		"size": 5000,
		"total": 694029,
		"limit": 5000,
		"users": [
			{
				"IsSuperAdmin": false,
				"Email": "jdoe@domain.com",
				"Gsid": "1P01R8QHKJWTMSGS4SD505EC88GKECJH7KKD",
				"SFDCUserName": "jdoe@domain.com.abc.sdpqa.gs",
				"ModifiedDate": "2023-04-05T02:50:11Z",
				"ProfilePicture": null,
				"Name": "John Doe",
				"LicenseType": "Full",
				"Status": "Active"
			},
			{
				"IsSuperAdmin": false,
				"Email": "ckent@domain.com.",
				"Gsid": "1P01R8QHKJWTMSGS4S9MWEFAWGR3LDSQ0UDR",
				"SFDCUserName": "ckent@domain.com.abc.sdpqa.gs",
				"ModifiedDate": "2023-04-04T18:33:43Z",
				"ProfilePicture": null,
				"Name": "Clark Kent",
				"LicenseType": "Full",
				"Status": "Active"
			},

 

 

 

Logs:

 

 

2023-04-05 03:04:35,182 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - EntitlementType 'LicenseType' for Endpoint 'Gainsight' found with EntitlementTypekey - 2978
2023-04-05 03:04:35,183 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService  - Time Taken to populateEntitlementMapByConfig  : 0.001
2023-04-05 03:04:35,183 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService  - Inside importAccountsFull:persistEntObjects, pptTypeSep : ~#~
2023-04-05 03:04:35,192 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - EntitlementType 'LicenseType' for Endpoint 'Gainsight' found with EntitlementTypekey - 2978
2023-04-05 03:04:35,192 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService  - Time Taken to populateEntitlementMapByConfig  : 0.0
2023-04-05 03:04:35,192 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService  - Inside importAccountsFull:persistEntObjects, pptTypeSep : ~#~
2023-04-05 03:04:35,201 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - EntitlementType 'LicenseType' for Endpoint 'Gainsight' found with EntitlementTypekey - 2978
2023-04-05 03:04:35,202 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService  - Time Taken to populateEntitlementMapByConfig  : 0.001
2023-04-05 03:04:35,202 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService  - Inside importAccountsFull:persistEntObjects, pptTypeSep : ~#~
2023-04-05 03:04:35,432 [quartzScheduler_Worker-9] DEBUG rest.RestUtilService  - totalCount: null
2023-04-05 03:04:35,432 [quartzScheduler_Worker-9] DEBUG rest.RestUtilService  - offset: 10000
2023-04-05 03:04:35,432 [quartzScheduler_Worker-9] DEBUG rest.RestUtilService  - paginationParam.doBreak: true
2023-04-05 03:04:35,434 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - Entered markStatusBasedOnThreshold
2023-04-05 03:04:35,434 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - Inside markAccountStatus
2023-04-05 03:04:35,434 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - Start setActiveAccountStatus
2023-04-05 03:04:35,434 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - Setting Batch Size from config = 1000
2023-04-05 03:04:35,434 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - End setActiveAccountStatus
2023-04-05 03:04:35,434 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - Entered isThresholdExceeded method
2023-04-05 03:04:35,434 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - Start appendAdditionalCondition
2023-04-05 03:04:35,434 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - End appendAdditionalCondition
2023-04-05 03:04:35,488 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - accountsToBeDeletedList qry: select new Map(acc.id as id, acc.status as status) FROM Accounts acc WHERE acc.endpointkey = 3872 and acc.jobid <> 4851938 and acc.jobid <> 0 and acc.jobid is not null and (acc.status <> 'PROCESSING' or acc.status is null) and acc.name not like '%-Deleted on-%' 
2023-04-05 03:04:35,488 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - totalAccountsToBeDeleted: 5227
2023-04-05 03:04:35,489 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - Exiting isThresholdExceeded method
2023-04-05 03:04:35,489 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - ThresholdExceeded: true
2023-04-05 03:04:35,489 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - Threshold exceeded. No Action will be performed
2023-04-05 03:04:35,489 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - Entered markLockStateForAccounts
2023-04-05 03:04:35,489 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - Setting Batch Size from config = 1000
2023-04-05 03:04:35,489 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - No json to set the account lock state
2023-04-05 03:04:35,489 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - Exit markLockStateForAccounts
2023-04-05 03:04:35,489 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - Entered changeAccountsJobId
2023-04-05 03:04:35,560 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - Accounts job id changed to -1 from 0 which are newly created while import was running : 0
2023-04-05 03:04:35,560 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - Exit changeAccountsJobId
2023-04-05 03:04:35,560 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService  - Exiting markAccountStatus
2023-04-05 03:04:35,560 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService  - Mapping Users to accounts.
2023-04-05 03:04:35,560 [quartzScheduler_Worker-9] DEBUG saviynt.ImportExternalDbService  - Associating Users and Accounts
2023-04-05 03:04:35,691 [quartzScheduler_Worker-9] DEBUG saviynt.ImportExternalDbService  - Orphan Accounts- 1243
2023-04-05 03:04:35,691 [quartzScheduler_Worker-9] DEBUG saviynt.ImportExternalDbService  - Rule: (users.email) = accounts.customproperty4
2023-04-05 03:04:35,691 [quartzScheduler_Worker-9] DEBUG saviynt.ImportExternalDbService  - sql = 
                            SELECT USERS.USERKEY AS USERKEY, ACCOUNTS.ACCOUNTKEY AS ACCOUNTKEY FROM ACCOUNTS ACCOUNTS
                            LEFT JOIN USER_ACCOUNTS UA ON ACCOUNTS.ACCOUNTKEY = UA.ACCOUNTKEY
                            LEFT JOIN USERS USERS ON 
                            (users.email) = accounts.customproperty4 
                            WHERE ACCOUNTS.ENDPOINTKEY = 3872 AND ACCOUNTS.STATUS IN ('Active','1','Manually Provisioned')
                            AND ACCOUNTS.ACCOUNTKEY IS NOT NULL AND UA.ACCOUNTKEY IS NULL
                            AND ACCOUNTS.NAME IS NOT NULL AND USERS.USERNAME IS NOT NULL
                                     
2023-04-05 03:04:35,792 [quartzScheduler_Worker-9] DEBUG saviynt.ImportExternalDbService  - Total accounts to be correlated = 0
2023-04-05 03:04:35,792 [quartzScheduler_Worker-9] DEBUG saviynt.ImportExternalDbService  - User-accounts correlated: 0
2023-04-05 03:04:35,796 [quartzScheduler_Worker-9] DEBUG saviynt.ImportExternalDbService  - Orphan Accounts remaining- 1243
2023-04-05 03:04:35,796 [quartzScheduler_Worker-9] DEBUG rest.RestProvisioningService  - Mapping of Users to Accounts is 

 

 

 

 

2 REPLIES 2

RakeshMG
Saviynt Employee
Saviynt Employee

2023-04-05 03:04:35,489 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService - Exiting isThresholdExceeded method
2023-04-05 03:04:35,489 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService - ThresholdExceeded: true
2023-04-05 03:04:35,489 [quartzScheduler_Worker-9] DEBUG services.ImportUtilityService - Threshold exceeded. No Action will be performed

As per logs Threshold is exceeded.

TotalAccountsToBeDeleted: 5227

Please update the config in Admin -> Identity Repository -> Connection -> statusAndThresholdConfig.

 

 

 


​Regards

Rakesh M Goudar

Sivagami
Valued Contributor
Valued Contributor

The error is due to the threshold set in your import json (accountThresholdValue)

   "statusAndThresholdConfig": {
      "accountsNotInImportAction": "Suspend",
      "accountThresholdValue": 1000,
      "deleteAccEntForActiveAccounts": true,
      "statusColumn": "customproperty6"
    },

Replace 1000 with 6000 for accountThresholdValue & rerun the import.

-Siva