8.1 Sample Configurations for ServiceNow REST Target Application

The following are a few examples of the advanced configurations and schema details for ServiceNow REST Target application.

uidAttributes: "__ACCOUNT__.sys_id","__GROUP__.value","__GROUPLKP__.sys_id","__ROLE__.value","__ROLELKP__.sys_id","Department.sys_id"

nameAttributes: "__ACCOUNT__.user_name","__GROUP__.name","__GROUPLKP__.name","__ROLE__.name","__ROLELKP__.name","Department.name"

relURIs: "__ACCOUNT__.CREATEOP=/api/now/v2/table/sys_user?sysparm_input_display_value=true","__ACCOUNT__.SEARCHOP=/api/now/v2/table/sys_user?$(Filter Suffix)$&sysparm_limit=$(PAGE_SIZE)$&sysparm_offset=$(PAGE_OFFSET)$","__ACCOUNT__=/api/now/v2/table/sys_user/$(__UID__)$?sysparm_input_display_value=true","__GROUP__.CREATEOP=/api/now/v2/table/sys_user_group","__GROUPLKP__.SEARCHOP=/api/now/v2/table/sys_user_group?$(Filter Suffix)$&sysparm_limit=$(PAGE_SIZE)$&sysparm_offset=$(PAGE_OFFSET)$","__GROUPLKP__=/api/now/v2/table/sys_user_group/$(__UID__)$","__ROLELKP__.SEARCHOP=/api/now/v2/table/sys_user_role?$(Filter Suffix)$&sysparm_limit=$(PAGE_SIZE)$&sysparm_offset=$(PAGE_OFFSET)$","__ACCOUNT__.__GROUP__.UPDATEOP=/api/now/table/sys_user_grmember","__ACCOUNT__.__ROLE__.UPDATEOP=/api/now/table/sys_user_has_role","__ACCOUNT__.__GROUP__.SEARCHOP=/api/now/v2/table/sys_user_grmember?sysparm_query=user.sys_id=$(__UID__)$&sysparm_limit=$(PAGE_SIZE)$&sysparm_offset=$(PAGE_OFFSET)$","__ACCOUNT__.__ROLE__.SEARCHOP=/api/now/table/sys_user_has_role?sysparm_query=user.sys_id=$(__UID__)$&sysparm_limit=$(PAGE_SIZE)$&sysparm_offset=$(PAGE_OFFSET)$","__ACCOUNT__.__GROUP__.DELETEOP=/api/now/table/sys_user_grmember/$(__MEMBERSHIP__.sys_id)$","__ACCOUNT__.__MEMBERSHIP__.__GROUP__.SEARCHOP=/api/now/v2/table/sys_user_grmember?sysparm_query=user.sys_id=$(__UID__)$%5Egroup.sys_id=$(__GROUP__.sys_id)$","__ACCOUNT__.__ROLE__.DELETEOP=/api/now/table/sys_user_has_role/$(__MEMBERSHIP__.sys_id)$","__ACCOUNT__.__MEMBERSHIP__.__ROLE__.SEARCHOP=/api/now/v2/table/sys_user_has_role?sysparm_query=user.sys_id=$(__UID__)$%5Erole.sys_id=$(__ROLE__.sys_id)$","Department.SEARCHOP=/api/now/v2/table/cmn_department?sysparm_limit=$(PAGE_SIZE)$&sysparm_offset=$(PAGE_OFFSET)$","__ACCOUNT__.__ENABLE__.UPDATEOP=/api/now/v2/table/sys_user/$(__UID__)$?sysparm_input_display_value=true","__ACCOUNT__.__ENABLE__.UPDATEOP=/api/now/v2/table/sys_user/$(__UID__)$?sysparm_input_display_value=true"

opTypes: "__ACCOUNT__.__GROUP__.UPDATEOP=POST","__ACCOUNT__.__ROLE__.UPDATEOP=POST"

specialAttributeTargetFormat: "__ACCOUNT__.__GROUP__=group","__ACCOUNT__.__GROUPLKP__=group","__ACCOUNT__.__ROLE__=role","__ACCOUNT__.__ROLELKP__=role"

specialAttributeHandling: "__ACCOUNT__.__GROUP__.UPDATEOP=SINGLE","__ACCOUNT__.__ROLE__.UPDATEOP=SINGLE","__ACCOUNT__.__ENABLE__.CREATEOP=SINGLE","__ACCOUNT__.__ENABLE__.UPDATEOP=SINGLE"

customPayload: "__ACCOUNT__.__GROUP__.UPDATEOP={\"user\": \"$(__UID__)$\",\"group\": \"$(value)$\"}","__ACCOUNT__.__ROLE__.UPDATEOP={\"user\": \"$(__UID__)$\",\"role\": \"$(value)$\"}","__ACCOUNT__.__ENABLE__.UPDATEOP={\"active\":\"$(__ENABLE__)$\",\"locked_out\":\"false\"}"

jsonResourcesTag: "__ACCOUNT__=result","__GROUP__=result","__GROUPLKP__=result","__ACCOUNT__.__GROUP__=result","__ACCOUNT__.__ROLE__=result","__ROLE__=result","__ROLELKP__=result","Department=result","__ACCOUNT__.__MEMBERSHIP__.__GROUP__=result","__ACCOUNT__.__MEMBERSHIP__.__ROLE__=result"

statusAttributes: "__ACCOUNT__.active"

passwordAttribute: user_password

enableEmptyString: true

The following is an example of Schema details:
Parent Form Target Attributes:
  • __NAME__
  • __UID__
  • __PASSWORD__
  • first_name
  • last_name
  • title
  • department
  • phone
  • mobile_phone
  • password_needs_reset
  • Long
  • locked_out
  • date_format
  • calendar_integration
  • time_zone
  • web_service_access_only
  • internal_integration_user
  • __ENABLE__

Roles child form target attributes: __ROLE__~__ROLE__~value

Groups child form target attributes: __GROUP__~__GROUP__~value