> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# ServiceNow authentication guide

export const maia = "Maia";

This is a step-by-step guide to acquiring ServiceNow credentials and authorizing the [ServiceNow Load](/docs/components/servicenow-load) and [ServiceNow Query](/docs/components/servicenow-query) components.

***

## Create an OAuth connection

1. Follow the instructions in [OAuth](/docs/guides/oauth), and select ServiceNow in the **Provider** field. Then, follow the steps below to fill in the fields in the **Values** section of the OAuth creation process.

2. Follow the instructions in the ServiceNow [Create an endpoint for clients to access the instance](https://www.servicenow.com/docs/r/platform-security/authentication/t_CreateEndpointforExternalClients) guide to create a new OAuth API endpoint.

3. Copy the **Client ID** and **Client Secret** displayed for your new OAuth API endpoint.

4. Follow the instructions in the ServiceNow [Elevate to a privileged role](https://www.servicenow.com/docs/r/platform-security/t_ElevateToAPrivilegedRole) guide to elevate to the `security_admin` role.

5. Follow the steps in the ServiceNow [Configure an ACL rule](https://www.servicenow.com/docs/r/platform-security/access-control/t_CreateAnACLRule) guide to create a new Access Control List rule with the following properties. All other properties can be configured as you choose.

   * **Type:** `record`
   * **Operation:** `read`
   * **Name:** `Table [sys_db_object]`

   <Note>
     Access to the `sys_glide_object` is required to fetch some ServiceNow table metadata. To allow {maia} to access this metadata, repeat this step using `Field [sys_glide_object]` in the **Name** property.
   </Note>

6. Follow the instructions in the ServiceNow [Assign a role to a user](https://www.servicenow.com/docs/r/platform-administration/user-administration/t_AssignARoleToAUser) guide to assign your required roles to the user whose credentials you want to use to create your OAuth connection in {maia}.

   <Note>
     Access to `sys_dictionary` is required to fetch schema information from ServiceNow. To enable the chosen user to access `sys_dictionary`, assign the `personalize_dictionary` role to the user.
   </Note>

7. Return to the OAuth creation process in {maia} and fill in the fields in the **Values** section as follows:

   * **Client ID:** The Client ID of your new OAuth app.
   * **Client secret:** The Client Secret of your new OAuth app.
   * **Instance:** The subdomain of your ServiceNow instance URL, e.g. `company` if your URL is `company.service-now.com`.
   * **Username:** The username of the ServiceNow user whose credentials you want to use to create this OAuth connection.
   * **Password:** The password of the ServiceNow user whose credentials you want to use to create this OAuth connection.

8. Click **Authorize**.

Your new OAuth connection is ready for use with the [ServiceNow Load](/docs/components/servicenow-load) or [ServiceNow Query](/docs/components/servicenow-query) component.
