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.
- Complete the Setup steps.
- Add a Get Credential activiTBHty for each
SecureString
input property (e.g., two total - one for Password and one for ClientSecret) - Add the ServiceNow Scope activity to your project.
- Enter values for the Authentication and Connection properties.
- 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 |
|
Required | Yes |
Default value | ServiceNow Scope |
Allowed values | Enter a |
Notes | N/A |
Authentication
Username
The username for your ServiceNow instance.
Attributes | Details |
---|---|
Type |
|
Required | Yes |
Default value | Empty |
Allowed values | Enter a |
Notes | This value may be different from your ServiceNow account if you have multiple instances. |
Password
The password (associated with the Username) to your ServiceNow instance.
Attributes | Details |
---|---|
Type |
|
Required | Yes |
Default value | Empty |
Allowed values | Enter a |
Notes | This value may be different from your ServiceNow account if you have multiple instances. |
Client Secret
The SecureString
used to authorize communications between UiPath and your ServiceNow instance.
Attributes | Details |
---|---|
Type |
|
Required | No |
Default value | Empty |
Allowed values | Enter a |
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. |
ClientId
The auto-generated, unique ID of your application registry.
Attributes | Details |
---|---|
Type |
|
Required | No |
Default value | Empty |
Allowed values | Enter a |
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. |
Connection
EndpointURL
The URL of your ServiceNow instance.
Attributes | Details |
---|---|
Type |
|
Required | Yes |
Default value | Empty |
Allowed values | Enter a |
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 |
|
Required | No (recommended if you plan to have multiple ServiceNow Scope activities across your projects). |
Default value | Empty |
Allowed values | Enter a 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 |
|
Required | No |
Default value | Empty |
Allowed values | Enter a UiPath.BAF.Models.Connection.IConnection |
Notes | The |
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