# How to Restrict Access to Specific Tables for Integration

### Use Case:

If you want to restrict full access to specific tables in ServiceNow for certain companies during integration, you can do this by adding Business Rules. This allows you to specify which tables you don't want to provide access to.

For example, if you only want to integrate **Incidents** and not **Change Requests**, you can restrict access to the **ChangeRequest** table.

**Scenario:**

Integrating **ChangeRequest** (ServiceNow) ↔︎ **Story** (Jira)

<figure><img src="/files/4sm4rihQUevw7x0roQYT" alt=""><figcaption><p>Sample integration ChangeRequest (ServiceNow) ↔︎ Story (Jira)</p></figcaption></figure>

If you restrict access to the **ChangeRequest** table, attempting to create a Story in Jira will result in an error when trying to create a ChangeRequest in ServiceNow. This error will appear in the Getint integration logs.

### How to Deny Access to the ChangeRequest Table

* Go to **Administration > Business Rule**.
* Follow the steps shown in the images below to create a new Business Rule.
* Configure the fields as shown.

<figure><img src="/files/w50DiinQEgdO14sQmPFo" alt=""><figcaption><p>Create a new Business Rule</p></figcaption></figure>

<figure><img src="/files/4MOUg9TX8jhk1M3thylZ" alt=""><figcaption><p>Everything should be set as in the picture above</p></figcaption></figure>

<figure><img src="/files/atJcPz10mZJ525FPCpSI" alt=""><figcaption><p>Go to the Advanced tab and paste the script shown below</p></figcaption></figure>

* In the **Advanced** tab, paste the following script to block access to the **ChangeRequest** table:

```
(function executeRule(current, previous) {
	// Bypass restriction for admin users
    if (gs.hasRole('admin')) {
        return; // Allow admins to proceed
    }
    // Abort any operation on the change_request table
    current.setAbortAction(true); // Prevent any operation from completing
    // Apply a query that results in no records being returned
    current.addQuery('number', "00000000000"); // An invalid query to ensure no records are returned
})(current, previous);
```

This script will prevent any operation (Insert, Update, Query, or Delete) from happening on the **ChangeRequest** table by aborting the action and returning no records.

### How to Restrict Access to Other Tables

To restrict access to other tables, simply repeat the steps described above for the **ChangeRequest** table.

The only change required is to select a different table in the **Table** field. You can restrict access to various tables such as:

* **Requested Item**
* **Incident**
* **Incident Task**
* **Problem**
* Other tables like **sys\_dictionary** or **journal\_field\_type** which we may have allowed access to in previous ACLs.

### Summary

By following this approach, you can ensure that companies only access the tables necessary for their integration and block unwanted access to other tables.

If you need any further help or if you are experiencing issues with your installation, feel free to open a support ticket at our [Support Portal.](https://getint.io/help-center)

<figure><img src="/files/otyodSR2k1YTwh3mrnVq" alt=""><figcaption><p><a href="https://calendly.com/d/cpws-jb2-8xx/demo-call-all-team
">Start your integration journey. Schedule a free consultation with our Getint Integration Expert today!</a></p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.getint.io/guides/integration-synchronization/jira-servicenow-integration/how-to-restrict-access-to-specific-tables-for-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
