Skip to content

Commit dd1e693

Browse files
committed
Update servicenow.md
1 parent b1b9e11 commit dd1e693

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

copilot/employee-self-service/servicenow.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,25 @@ This task is required to define the custom script as a resource for the REST API
183183
|---------|---------|
184184
|Name |GetAllUserCriteria |
185185
|Relative path |/user_criteria |
186-
|Script |Copy and paste the following script AS IS:<br> (function execute (/*RESTAPIRequest*/ request,<br>/*RESTAPIResponse*/ response)<br>{<br>var queryParams = request.queryParams;<br>var user = new String(queryParams.user);<br>return (new<br>sn_uc.UserCriteriaLoader()).getAllUserCriteria(user);<br>}<br>)(request, response); |
186+
|Script |Copy and paste the script (noted after this table) exactly as is. |
187187
|Requires authentication |Checked |
188188
|Requires ACL authorization |Checked<br>Ensure that the ACL created in Task 2 is set correctly and remove any other default values. |
189189

190+
#### Script to copy
191+
192+
```javascript
193+
(function execute (/*RESTAPIRequest*/ request,
194+
/*RESTAPIResponse*/ response )
195+
{
196+
var queryParams = request.queryParams;
197+
var user = new String(queryParams.user);
198+
return (new
199+
sn_uc.UserCriteriaLoader()).getAllUserCriteria(user);
200+
}
201+
) (request, response);
202+
```
203+
204+
190205
4. Select **Submit** to save changes.
191206

192207
This wraps up all the configuration required on the ServiceNow side, now the next set of tasks are on Microsoft 365 side.

0 commit comments

Comments
 (0)