Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

serviceNow as Trusted Source

Manu269
All-Star
All-Star

Hello Team,

We are working on an integration where we need to use serviceNow as trusted source for users.

Can someone share the json for ImportUserJSON

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.
5 REPLIES 5

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @Manu269,

You may try with the below sample for the userimportjson for the servicenow.

 

 

{
  "connection": "userAuth",
  "url": "https://xxxx.service-now.com/api/now/table/sys_user?sysparm_display_value=true",
  "httpMethod": "GET",
  "httpHeaders": {
    "contentType": "application/json",
    "Authorization": "${access_token}"
  },
  "colsToPropsMap": {
    "employeeid": "employee_number~#~char",
    "lastname": "last_name~#~char",
    "displayname": "name~#~char",
    "firstname": "first_name~#~char",
    "departmentname": "department.display_value~#~char",
    "email": "email~#~char",
    "country": "country~#~char",
    "phonenumber": "mobile_phone~#~char",
    "title": "title~#~char",
    "username": "name~#~char",
    "customproperty3": "active~#~char",
    "customproperty11": "manager~#~char",
    "startdate": "u_start_date~#~date",
    "enddate": "u_end_date~#~date",
    "employeetype": "u_employee_type~#~char",
    "customproperty2": "sys_id~#~char",
    "customproperty5": "u_manager~#~char",
    "customproperty1": "u_number~#~char"
  },
  "userResponsePath": "result"
}

 

 


Thanks.

If you find the above response useful, Kindly Mark it as "Accept As Solution".

Manu269
All-Star
All-Star

@sudeshjaiswal few more questions :

1. How do we handle the pagination logic?

2. How do we map active inactive status?

3. How do we map manager, department, company, cost_center attribute? The reason behind these attrributes has a link.

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @Manu269,

1. How do we handle the pagination logic?

"pagination": {
"offset": {
"offsetParam": "sysparm_offset",
"batchParam": "sysparm_limit",
"batchSize": 500,
"totalCountPath": "headers.x-total-count"
}
},

2. How do we map active inactive status?

There are two ways to control either you can define in the json "Support for importing the status information of users to IGA using the statusConfig attribute"
For Ref: https://docs.saviyntcloud.com/bundle/REST-v23x/page/Content/Developers-Handbook.htm
or through the userimportjob.

3. How do we map manager, department, company, cost_center attribute? The reason behind these attrributes has a link.

You can refer the above json and do the changes accordingly as per your requirement.

Thanks.

If you find the above response useful, Kindly Mark it as "Accept As Solution".

Manu269
All-Star
All-Star

@sudeshjaiswal I tried this :

{
"connection": "ServiceNow",
"url": "https://XXXX.service-now.com/api/now/table/sys_user?sysparm_limit=10000&sysparm_display_value=true&u...",
"httpMethod": "GET",
"httpHeaders": {
"contentType": "application/json",
"Authorization": "${access_token}"
},
"colsToPropsMap": {
"employeeid": "employee_number~#~char",
"lastname": "last_name~#~char",
"displayname": "name~#~char",
"firstname": "first_name~#~char",
"departmentname": "department.display_value~#~char",
"location": "location.display_value~#~char",
"email": "email~#~char",
"manager": "manager.display_value~#~char",
"country": "country~#~char",
"phonenumber": "mobile_phone~#~char",
"title": "title~#~char",
"city": "city~#~char",
"street": "street~#~char",
"username": "user_name~#~char",
"CUSTOMPROPERTY3": "active~#~char",
"CUSTOMPROPERTY11": "manager.display_value~#~char",
"startdate": "u_start_date~#~date",
"enddate": "u_end_date~#~date",
"employeetype": "u_employee_type~#~char",
"CUSTOMPROPERTY2": "sys_id~#~char",
"CUSTOMPROPERTY5": "u_manager~#~char",
"JOB_FUNCTION": "u_job_function.display_value~#~char",
"CUSTOMPROPERTY1": "user_name~#~char"
},
"userResponsePath": "result",
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "max",
"batchSize": 1000,
"totalCountPath": "count"
},
"nextUrl": {
"nextUrlPath": "${headers?.Link?.split(',')?.size()==4?headers?.Link?.split(',')[2]?.replace('<', '')?.replace('>;rel=\"next\"','')?.trim():headers?.Link?.split(',')?.size()==3&&headers?.Link?.split(',')[1]?.contains('next')?headers?.Link?.split(',')[1]?.replace('<', '')?.replace('>;rel=\"next\"','')?.trim():null}"
}
}
}

We created separate connection to pull in the managers

{
"connection": "userAuth",
"url": "https://xxxx.service-now.com/api/now/table/sys_user?sysparm_limit=10000&user_name=Justina.Dragaj",
"httpMethod": "GET",
"httpHeaders": {
"contentType": "application/json",
"Authorization": "${access_token}"
},
"colsToPropsMap": {
"username": "user_name~#~char",
"CUSTOMPROPERTY11": "manager.value~#~char",
"CUSTOMPROPERTY2": "sys_id~#~char",
"CUSTOMPROPERTY15": "name~#~char"
},
"userResponsePath": "result",
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "max",
"batchSize": 1000,
"totalCountPath": "count"
},
"nextUrl": {
"nextUrlPath": "${headers?.Link?.split(',')?.size()==4?headers?.Link?.split(',')[2]?.replace('<', '')?.replace('>;rel=\"next\"','')?.trim():headers?.Link?.split(',')?.size()==3&&headers?.Link?.split(',')[1]?.contains('next')?headers?.Link?.split(',')[1]?.replace('<', '')?.replace('>;rel=\"next\"','')?.trim():null}"
}
}
}

 

Used following MODIFYUSERDATAJSON 

{
"ADDITIONALTABLES": {
"USERS": "SELECT CUSTOMPROPERTY2,customproperty11, username FROM USERS"
},
"COMPUTEDCOLUMNS": [
"manager"
],
"PREPROCESSQUERIES": [
"update newuserdata set manager= (select m.username from currentusers m where customproperty11 = m.customproperty11 and customproperty11 is not null)"
]
}

Issue:

We are able to pull in the user but facing issue for mapping the manager to users.

Please assist.

 

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @Manu269,

Can you please provide the postman response?

Thanks.

If you find the above response useful, Kindly Mark it as "Accept As Solution".