Subscribe

UiPath Activities

The UiPath Activities Guide

ServiceNow Scope

👍

Best Practice

While the ServiceNow Scope activity can use standard authentication (UserName) and (Password), it is highly recommend to use OAuth security for all your connections per the steps below.

The ServiceNow activities uses the OAuth 1.0 protocol to establish an authenticated connection between UiPath and your ServiceNow instance. This connection authorizes a Robot to call the ServiceNow APIs and access resources on your behalf.

To enable authorization, you create an OAuth application endpoint to your ServiceNow instance. Creating this endpoint generates an OAuth client application record, Client ID, and Client Secret to enable authenticated access to your instance.

After creating your endpoint, you enter your ServiceNow credentials along with the application endpoint URL, Client ID, and Client Secret in the ServiceNow Scope activity.

👍

Best Practice

Integration user roles should only be assigned the minimum necessary permissions for performing the tasks enabled by the activities in this package (e.g., admin, itil, soap_ecc, and etc. should not be used for integration user roles). Inbound web services that modify tables, should be restricted to the appropriate system roles.

For more information, see the Roles section in the ServiceNow documentation.

How it works

The following steps and message sequence diagram is an example of how the activity works from design time (i.e., the activity dependencies and input/output properties) to run time.

  1. Complete the Setup steps.
  2. Add a Get Credential activiTBHty for each SecureString input property (e.g., two total - one for Password and one for ClientSecret)
  3. Add the ServiceNow Scope activity to your project.
  4. Enter values for the Authentication and Connection properties.
  5. Create and enter a IConnection variable for Output properties.
    • You can use this variable in subsequent uses of the ServiceNow Scope activity.

If you encounter issues using standard authentication, please see Standard Authentication Tips.

Properties

The values for the following properties are specified when adding this activity to your project in UiPath Studio.

Configure

To build your project and enable the Object Wizard in other activities, you must use the Connection Wizard by clicking the Configure button.

To learn more, see the Wizards section in the About page.

Common

DisplayName

The display name of the activity.

Attributes

Details

Type

String

Required

Yes

Default value

ServiceNow Scope

Allowed values

Enter a String or String variable.

Notes

N/A


Authentication

Username

The username for your ServiceNow instance.

Attributes

Details

Type

String

Required

Yes

Default value

Empty

Allowed values

Enter a String variable.

Notes

This value may be different from your ServiceNow account if you have multiple instances.
The Username is associated with the Password. It's recommended that you generate a String variable by following the Create Credential Assets section of the Setup guide.
To enter your String variable, use a Get Credential activity that outputs your Credential Asset (see example below).


Password

The password (associated with the Username) to your ServiceNow instance.

Attributes

Details

Type

String

Required

Yes

Default value

Empty

Allowed values

Enter a String or String variable.

Notes

This value may be different from your ServiceNow account if you have multiple instances.
To generate a SecureString variable, see the Create Credential Assets section of the Setup guide.
To enter your SecureString variable, use a Get Credential activity that outputs your Credential Asset (see example below).

Client Secret

The SecureString used to authorize communications between UiPath and your ServiceNow instance.

Attributes

Details

Type

SecureString

Required

No

Default value

Empty

Allowed values

Enter a SecureString variable.

Notes

The ClientSecret gets generated for your ServiceNow instance when you complete an application registry. For more information, see the Setup OAuth section of the Setup guide.
To generate a SecureString variable, see the Create Credential Assets section of the Setup guide.
To enter your SecureString variable, use a Get Credential activity that outputs your Credential Asset (see example below).


ClientId

The auto-generated, unique ID of your application registry.

Attributes

Details

Type

String

Required

No

Default value

Empty

Allowed values

Enter a String variable.

Notes

The ClientId gets generated for your ServiceNow instance when you complete an application registry. For more information, see the Setup OAuth section of the Setup guide.
The ClientId is associated with the ClientSecret. It's recommended that you generate a String variable by following the Create Credential Assets section of the Setup guide.
To enter your String variable, use a Get Credential activity that outputs your Credential Asset (see example below).


Connection

EndpointURL

The URL of your ServiceNow instance.

Attributes

Details

Type

String

Required

Yes

Default value

Empty

Allowed values

Enter a String or String variable.

Notes

The URL should be to your ServiceNow instance and not the Redirect URL in your application registry.

Misc

Private

If selected, the values of variables and arguments are no longer logged at Verbose level.

Attributes

Details

Type

Checkbox

Required

No

Default value

Not Selected

Allowed values

Selected or Not Selected

Notes

N/A


Output

ServiceNowConnection
A record of your established connection that you can use in subsequent ServiceNow Scope activities.

Attributes

Details

Type

IConnection

Required

No (recommended if you plan to have multiple ServiceNow Scope activities across your projects).

Default value

Empty

Allowed values

Enter a IConnection variable.

UiPath.BAF.Models.Connection.IConnection

Notes

N/A


UseExistingConnection

A connection record from a parent ServiceNow Scope activity that you can use instead of establishing a new connection.

Attributes

Details

Type

IConnection

Required

No

Default value

Empty

Allowed values

Enter a IConnection variable.

UiPath.BAF.Models.Connection.IConnection

Notes

The IConnection variable must be from a previously run SeriviceNow Scope activity (parent) that still has an active connection.
If you're unable to establish a connection using this property, try re-running your parent ServiceNow Scope activity.


Example

The following image shows an example of the activity dependency relationship and input/output property values.

For step-by-step instructions and examples, see the Quickstart guide.

Standard Authentication Tips

In the ServiceNow activity pack, the Basic Authentication (username and password) can be used to run activities. The steps are delineated below:

Design Time

At Design Time enter the username and password with the endpoint URL and these details are saved. Note that the credentials are not validated with ServiceNow for basic authentication at the scope level. Only at a later stage when ServiceNow entities are fetched in an individual activity or at run time while running an activity are these basic authentication credentials used to authenticate.

If the basic authentication credentials provided are incorrect, then while loading the entity list an error will be thrown as it uses the saved basic authentication credentials to connect to ServiceNow and get entities/table names.

If the credentials (Username, Password, EndpointUrl) are correct the entities will be populated in the activity dropdown like below:

Runtime

Make sure the credentials are populated in the properties pane on the right.

If the credentials are correct the activity will run. If incorrect it will throw error at run time as shown below:

Updated 2 months ago


ServiceNow Scope


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.