and more in a single search tool across platforms. Read the announcement here. |
12/07/2023 08:29 AM - edited 12/07/2023 08:31 AM
Hi All,
Upon trying to populate the valid through and locked state we are seeing its not working but when mapping the attributes with custom property we see the values being populated.
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"statusColumn": "customproperty10",
"activeStatus": [
"true"
],
"deleteLinks": false,
"accountThresholdValue": 1000,
"correlateInactiveAccounts": true,
"inactivateAccountsNotInFile": false
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "xyz.abc.com",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpMethod": "GET"
},
"listField": "Resources",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "id~#~char",
"status": "active~#~char",
"name": "userName~#~char",
"displayname": "displayName~#~char",
"customproperty15": "urn:ietf:params:scim:schemas:extension:servicenow:custom:2~dot#0:User.lockedOut~#~char",
"VALIDTHROUGH": "urn:ietf:params:scim:schemas:extension:servicenow:custom:2~dot#0:User.endDate~#~datetime,
"customproperty2": "name.givenName~#~char",
"customproperty3": "name.familyName~#~char",
"customproperty4": "emails[0].value~#~char",
"customproperty5": "urn:ietf:params:scim:schemas:extension:servicenow:2~dot#0:User.manager.displayName~#~char",
"customproperty7": "urn:ietf:params:scim:schemas:extension:servicenow:2~dot#0:User.location.name~#~char",
"customproperty10": "active~#~char"
},
"statusAndThresholdConfig": {
"lockedstateColumn": "customproperty15",
"true":"locked",
"false":"unlocked"
},
"pagination": {
"offset": {
"offsetParam": "startIndex",
"batchParam": "count",
"batchSize": 10,
"totalCountPath": "completeResponseMap.totalResults"
}
}
}
}
}
}
12/07/2023 10:34 AM
lockedstate needs to be added in mapping and validthrough needs to be lower case
12/08/2023 12:30 AM
Hi Rushikesh,
As mentioned above we tried mapping lockedstate but it didn't populate also lower case also didn't work for validthrough
12/08/2023 08:14 PM
Share the josn
12/09/2023 03:49 AM
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"statusColumn": "customproperty10",
"activeStatus": [
"true"
],
"deleteLinks": false,
"accountThresholdValue": 1000,
"correlateInactiveAccounts": true,
"inactivateAccountsNotInFile": false
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "xyz.abc.com",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpMethod": "GET"
},
"listField": "Resources",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "id~#~char",
"status": "active~#~char",
"name": "userName~#~char",
"displayname": "displayName~#~char",
"lockedstate": "urn:ietf:params:scim:schemas:extension:servicenow:custom:2~dot#0:User.lockedOut~#~char",
"validthrough": "urn:ietf:params:scim:schemas:extension:servicenow:custom:2~dot#0:User.endDate~#~datetime,
"customproperty2": "name.givenName~#~char",
"customproperty3": "name.familyName~#~char",
"customproperty4": "emails[0].value~#~char",
"customproperty5": "urn:ietf:params:scim:schemas:extension:servicenow:2~dot#0:User.manager.displayName~#~char",
"customproperty7": "urn:ietf:params:scim:schemas:extension:servicenow:2~dot#0:User.location.name~#~char",
"customproperty10": "active~#~char"
},
"pagination": {
"offset": {
"offsetParam": "startIndex",
"batchParam": "count",
"batchSize": 10,
"totalCountPath": "completeResponseMap.totalResults"
}
}
}
}
}
}
12/09/2023 09:19 AM
Share postman response
Does cp2/3 is populated
12/11/2023 12:52 AM - last edited on 12/11/2023 06:58 AM by Sunil
Yes cp 2 and 3 are populated here is an api response
"userName": "jimmie.xxxxxxxxxx",
"name": {
"familyName": "xxxxxxxxx",
"givenName": "Jimmie"
},
"displayName": "Jimmie xxxxxxxxx",
"active": true,
"emails": [
{
"value": "jimmie.xxxxxxxxxx@example.com",
"type": "work"
}
],
"urn:ietf:params:scim:schemas:extension:servicenow:2.0:User": {
"gender": "Male",
"costCenter": {
"value": "91e8bbf43710200044e0bfc8bcbe5daa",
"name": "Customer Support",
"$ref": "https://
},
"department": {
"value": "5d7f17f03710200044e0bfc8bcbe5d43",
"name": "Customer Support",
"$ref": "https://"
},
"manager": {
"value": "06826bf03710200044e0bfc8bcbe5d81",
"displayName": "Justina xxxxxx",
"$ref": "https://"
}
},
"urn:ietf:params:scim:schemas:extension:servicenow:custom:2.0:User": {
"endDate": "1970-01-01T00:00:00Z",
"lockedOut": false
}
}
[This message has been edited by moderator to disable hyperlink to an URL]
12/12/2023 01:46 AM - edited 12/12/2023 01:48 AM
Hi Rushikesh,
We have populated the lockedstate now but validthrough is still not populated when we try to populate it in cp we see the result,
"customproperty11": "urn:ietf:params:scim:schemas:extension:servicenow:custom:2~dot#0:User.endDate~#~char",
12/12/2023 06:31 PM - edited 12/12/2023 06:33 PM
Ok below worked
urn:ietf:params:scim:schemas:extension:servicenow:custom:2~dot#0:User.lockedOut~#~char
12/11/2023 01:37 AM
@PiyushRai - Try to add the following to your JSON
"globalSettings": {
"dateFormat": "yyyy-MM-ddTHH:mm:ssZ"
},
Refer - Sample ImportAccountEntJSON:
12/12/2023 01:48 AM
Hi Rajesh,
It didn't work, when we try to populate cp we see the expected result populated
"customproperty11": "urn:ietf:params:scim:schemas:extension:servicenow:custom:2~dot#0:User.endDate~#~char",
12/12/2023 02:04 AM
This will work as this is a character, but your data is not a well formatted date.
you can use CONST and transform the string and try importing.
"validthrough": "#CONST#${dateString = response.urn:ietf:params:scim:schemas:extension:servicenow:custom:2~dot#0:User.endDate; returnString=Date.parse("yyyy-MM-ddTHH:mm:ssZ",dateString); return returnString;}~#~date",
12/12/2023 02:27 AM
Hi @Rajesh-R
This didn't work the customproperty i mapped with earlier is still populated and not validthrough?
Can this be because not properly formatted data?
12/12/2023 02:30 AM
Can you share the logs for this last run?
also enable {"showLogs":true}
12/12/2023 02:43 AM
12/12/2023 06:34 PM
You have set data type as datetime instead of date
"ecm-worker","2023-12-12T10:42:07.993+00:00","{"log":" \"validthrough\": \"#CONST#${dateString = response.urn:ietf:params:scim:schemas:extension:servicenow:custom:2~dot#0:User.endDate; returnString=Date.parse('yyyy-MM-ddTHH:mm:ssZ',dateString); return returnString;}~#~datetime\",\r\n","stream":"stdout","time":"2023-12-12T10:42:07.03386072Z"}"
Set below
"validthrough": "#CONST#${dateString = response.urn:ietf:params:scim:schemas:extension:servicenow:custom:2~dot#0:User.endDate; returnString=Date.parse("yyyy-MM-ddTHH:mm:ssZ",dateString); return returnString;}~#~date",
12/13/2023 12:43 AM
Did try it with datatype date as well but didn't work here is the logs for the same.
12/13/2023 12:59 AM
Try the following one:
"validthrough": "#CONST#${dateString = response.urn:ietf:params:scim:schemas:extension:servicenow:custom:2~dot#0:User.endDate; returnString=Date.parse("yyyy-MM-dd'T'HH:mm:ss'Z'",dateString); return returnString;}~#~date",
12/13/2023 02:15 AM
It shows a syntax error here
"yyyy-MM-dd'T'HH:mm:ss'Z'"
this is the json
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"statusColumn": "customproperty10",
"activeStatus": [
"true"
],
"deleteLinks": false,
"accountThresholdValue": 1000,
"correlateInactiveAccounts": true,
"inactivateAccountsNotInFile": false,
"lockedStatusColumn": "customproperty15",
"lockedStatusMapping": {
"Locked": [
"true"
],
"Unlocked": [
"false"
]
}
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xyz.com",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpMethod": "GET"
},
"listField": "Resources",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "id~#~char",
"status": "active~#~char",
"name": "userName~#~char",
"displayname": "displayName~#~char",
"validthrough": "#CONST#${dateString = response.urn:ietf:params:scim:schemas:extension:servicenow:custom:2~dot#0:User.endDate; returnString=Date.parse(("yyyy-MM-dd'T'HH:mm:ss'Z'"),dateString); return returnString;}~#~date",
"customproperty15": "urn:ietf:params:scim:schemas:extension:servicenow:custom:2~dot#0:User.lockedOut~#~char",
"customproperty2": "name.givenName~#~char",
"customproperty3": "name.familyName~#~char",
"customproperty4": "emails[0].value~#~char",
"customproperty5": "urn:ietf:params:scim:schemas:extension:servicenow:2~dot#0:User.manager.displayName~#~char",
"customproperty7": "urn:ietf:params:scim:schemas:extension:servicenow:2~dot#0:User.location.name~#~char",
"customproperty10": "active~#~char"
},
"pagination": {
"offset": {
"offsetParam": "startIndex",
"batchParam": "count",
"batchSize": 10,
"totalCountPath": "completeResponseMap.totalResults"
}
}
}
}
}
}
12/13/2023 02:30 AM
Please try the below:
"validthrough": "#CONST#${responseString = response.urn:ietf:params:scim:schemas:extension:servicenow:custom:2~dot#0:User.endDate; dateString = responseString.replaceAll('T',' ').replaceAll('Z','');returnString=Date.parse(('yyyy-MM-dd HH:mm:ss'),dateString); return returnString;}~#~date",
12/13/2023 03:02 AM
Validthrough didn't populate with the above code either.
12/14/2023 11:14 PM
@PiyushRai - Please use the following and confirm
{
"globalSettings": {
"dateFormat": "yyyy-MM-dd'T'HH:mm:ss"
},
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"statusColumn": "customproperty10",
"activeStatus": [
"true"
],
"deleteLinks": false,
"accountThresholdValue": 1000,
"correlateInactiveAccounts": true,
"inactivateAccountsNotInFile": false
}
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xyz.com",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpMethod": "GET"
},
"listField": "Resources",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "id~#~char",
"status": "active~#~char",
"name": "userName~#~char",
"displayname": "displayName~#~char",
"validthrough": "#CONST#${responseString = response.urn:ietf:params:scim:schemas:extension:servicenow:custom:2~dot#0:User.endDate; dateString = responseString.replaceAll('Z',''); return dateString;}~#~date",
"customproperty15": "urn:ietf:params:scim:schemas:extension:servicenow:custom:2~dot#0:User.lockedOut~#~char",
"customproperty2": "name.givenName~#~char",
"customproperty3": "name.familyName~#~char",
"customproperty4": "emails[0].value~#~char",
"customproperty5": "urn:ietf:params:scim:schemas:extension:servicenow:2~dot#0:User.manager.displayName~#~char",
"customproperty7": "urn:ietf:params:scim:schemas:extension:servicenow:2~dot#0:User.location.name~#~char",
"customproperty10": "active~#~char"
},
"pagination": {
"offset": {
"offsetParam": "startIndex",
"batchParam": "count",
"batchSize": 10,
"totalCountPath": "completeResponseMap.totalResults"
}
}
}
}
}
12/15/2023 01:31 AM
@Rajesh-R Hi Rajesh,
This code made all the accounts in endpoint in suspended from importing service.
12/15/2023 02:23 AM
@PiyushRai - Could you share the complete logs?
12/15/2023 02:51 AM
12/15/2023 03:08 AM
@PiyushRai - The latest attachment doesn't look like import logs.
12/15/2023 04:01 AM
12/15/2023 04:28 AM
@PiyushRai Please try with the following:
{
"globalSettings": {
"dateFormat": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
},
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"statusColumn": "customproperty10",
"activeStatus": [
"true"
],
"deleteLinks": false,
"accountThresholdValue": 100,
"correlateInactiveAccounts": true,
"inactivateAccountsNotInFile": false
}
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xyz.com",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpMethod": "GET"
},
"listField": "Resources",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "id~#~char",
"status": "active~#~char",
"name": "userName~#~char",
"displayname": "displayName~#~char",
"VALIDTHROUGH": "urn:ietf:params:scim:schemas:extension:servicenow:custom:2~dot#0:User.endDate~#~date",
"customproperty15": "urn:ietf:params:scim:schemas:extension:servicenow:custom:2~dot#0:User.lockedOut~#~char",
"customproperty2": "name.givenName~#~char",
"customproperty3": "name.familyName~#~char",
"customproperty4": "emails[0].value~#~char",
"customproperty5": "urn:ietf:params:scim:schemas:extension:servicenow:2~dot#0:User.manager.displayName~#~char",
"customproperty7": "urn:ietf:params:scim:schemas:extension:servicenow:2~dot#0:User.location.name~#~char",
"customproperty10": "active~#~char"
},
"pagination": {
"offset": {
"offsetParam": "startIndex",
"batchParam": "count",
"batchSize": 10,
"totalCountPath": "completeResponseMap.totalResults"
}
}
}
}
}
12/15/2023 06:21 AM
@Rajesh-R this didn't work either like last time it made all the accounts in endpoint in suspended from importing service. I wanted to thank you for your continuous help tho.
12/15/2023 06:23 AM
Which param is not working ?