The CData ADO.NET Provider for ServiceNow gives developers the power to easily connect.NET applications to ServiceNow data, including Schedules, Timelines, Questions, Syslogs, and more. The ServiceNow Data Provider makes this ServiceNow data look like SQL tables in your applications.
ServiceNow uses the OAuth 2.0 authentication standard. To authenticate using OAuth, you will need to register an OAuth app with ServiceNow to obtain the OAuthClientId and OAuthClientSecret. In addition to the OAuth values, you will need to specify the Instance, Username, and Password.
Parameter | Description |
---|---|
OAuth Client Id | Set this to the client Id in your app settings. |
OAuth Client Secret | Set this to the client secret in your app settings. |
OAuthAccessToken | Set this to the token returned using the ClientID and ClientSecret. |
Instance | The Service Now instance. |
Username | The username of the currently authenticated user. |
Password | The password of the currently authenticated user. |
To create an instance for ServiceNow, Open the ServiceNow App, move to developer’s portal and log in using the username and password we provided during the registration. Create an Instance. After Creating the instance, Release the instance using Release Instance Option in actions Column.
You can follow the procedure below to register an app and obtain the OAuth client credentials, the OAuthClientId and OAuthClientSecret. Note that you will need to activate the OAuth plugin for your instance if it is not active already.
In the Navigator, click System OAuth -> Application Registry.
Click New and then click Create an OAuth API Endpoint for External Clients.
Select the Active check box and enter the details for your app.
The com.snc.platform.security.oauth.is.active property must be active for the instance to generate the OAuth 2.0 tokens
After setting the following connection properties, you are ready to Generate the OAuth Tokens for the connection: Parameter | Description — | — InitiateOAuth | Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken connection property. OAuthClientId | Set this to the Client Id in your app settings. OAuthClientSecret | Set this to the Client Secret in your app settings. Password | Set this to your password. Username | Set this to your username. Instance | Set this to your instance. For example, if your instance URL is https://MyInstance12345.service-now.com/, set the Instance property to ‘ MyInstance12345
The provider connects to ServiceNow and gets the list of tables and the metadata for the tables by calling the appropriate Web services. Any changes you make to your ServiceNow account, such as activating a plugin, adding new columns to a table, or changing the data type of a column, will immediately be reflected when you connect.
The metadata for the tables in ServiceNow was obtained during run time based on some predefined schemas from ServiceNow and your unique ServiceNow account information. In Tables, you will find a small sample of the tables available in the ServiceNow development environment, which models the core ServiceNow system.
Name | Description |
---|---|
ast_contract |
The ServiceNow table ast_contract. |
ast_license_base |
The ServiceNow table ast_license_base. |
change_request |
The ServiceNow table change_request. |
cmdb_ci |
The ServiceNow table cmdb_ci. |
cmdb_metric |
The ServiceNow table cmdb_metric. |
cmn_building |
The ServiceNow table cmn_building. |
cmn_context_help |
The ServiceNow table cmn_context_help. |
cmn_cost_center |
The ServiceNow table cmn_cost_center. |
cmn_department |
The ServiceNow table cmn_department. |
cmn_location |
The ServiceNow table cmn_location. |
cmn_map_page |
The ServiceNow table cmn_map_page. |
cmn_notif_device |
The ServiceNow table cmn_notif_device. |
cmn_notif_device_variable |
The ServiceNow table cmn_notif_device_variable. |
cmn_notif_grmember |
The ServiceNow table cmn_notif_grmember. |
cmn_notif_group |
The ServiceNow table cmn_notif_group. |
cmn_notif_message |
The ServiceNow table cmn_notif_message. |
cmn_notif_service_provider |
The ServiceNow table cmn_notif_service_provider. |
cmn_other_schedule |
The ServiceNow table cmn_other_schedule. |
cmn_relative_duration |
The ServiceNow table cmn_relative_duration. |
cmn_schedule |
The ServiceNow table cmn_schedule. |
cmn_schedule_blackout |
The ServiceNow table cmn_schedule_blackout. |
cmn_schedule_condition |
The ServiceNow table cmn_schedule_condition. |
cmn_schedule_maintenance |
The ServiceNow table cmn_schedule_maintenance. |
cmn_schedule_page |
The ServiceNow table cmn_schedule_page. |
cmn_schedule_span |
The ServiceNow table cmn_schedule_span. |
cmn_timeline_page |
The ServiceNow table cmn_timeline_page. |
cmn_timeline_page_style |
The ServiceNow table cmn_timeline_page_style. |
cmn_timeline_sub_item |
The ServiceNow table cmn_timeline_sub_item. |
diagrammer_action |
The ServiceNow table diagrammer_action. |
expert_panel |
The ServiceNow table expert_panel. |
item_option_new |
The ServiceNow table item_option_new. |
question |
The ServiceNow table question. |
sc_category |
The ServiceNow table sc_category. |
sc_cat_item |
The ServiceNow table sc_cat_item. |
sla |
The ServiceNow table sla. |
sysauto |
The ServiceNow table sysauto. |
sysauto_script |
The ServiceNow table sysauto_script. |
syslog |
The ServiceNow table syslog. |
sysrule |
The ServiceNow table sysrule. |
system_db_object |
The ServiceNow table system_db_object. |
system_dictionary |
The ServiceNow table system_dictionary. |
system_documentation |
The ServiceNow table system_documentation. |
system_import_set_row |
The ServiceNow table system_import_set_row. |
system_script_client |
The ServiceNow table system_script_client. |
system_ui_policy |
The ServiceNow table system_ui_policy. |
system_ui_policy_action |
The ServiceNow table system_ui_policy_action. |
task |
The ServiceNow table task. |
v_field_creator |
The ServiceNow table v_field_creator. |
Stored Procedures are used to create materialized views -Tables that contain the result of a query. To work with materialized view, specify a query in the stored procedure call. The Resulting schema stored in XML file, which can be easily modified without calling the stored procedure again.
Name | Description |
---|---|
CreateSchema |
Creates a schema file for the specified table or view. |
GetOAuthAccessToken |
Gets the OAuth access token from ServiceNow. |
RefreshOAuthAccessToken |
Refreshes the OAuth access token used for authentication with various ServiceNow services |