# How to Setup an OAuth Connection

{% hint style="info" %}
This guide gives step-by-step instructions on how to setup an Oauth Connection for your Unifi Integration (ServiceNow to ServiceNow).
{% endhint %}

## Scope

This document will guide you through the process of configuring an OAuth Connection for your Unifi Integration (ServiceNow to ServiceNow). This will involve making configuration changes in both the identity provider and identity consumer instances. As such, this guide will examine the changes for each instance separately on the subsequent pages.

## Approach

In this guide, you will configure an additional OAuth Connection to another ServiceNow instance as part of the Incident Guide Integration (created when following the [Bidirectional Asynchronous Incident Guide](/unifi/4.1/integration-guides/bidirectional-asynchronous-incident-guide.md)). The external instance will act as the Identity Provider whilst the original instance will act as the Identity Consumer.

It is assumed that the Integration has been configured, packaged and moved to the external instance (see [here](/unifi/4.1/integration-guides/bidirectional-asynchronous-incident-guide/build-the-other-half.md) for details). Therefore, the Process, Web Service & Integration are already in place (if not, please ensure that at least those elements are in place before continuing).


---

# 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.sharelogic.com/unifi/4.1/configure/how-to-guides/how-to-setup-an-oauth-connection.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.
