# Set up applications for the Agentic Gateway

Before the Axiad Agentic Gateway can act in an application, you prepare an
account or an app in that application and enter its details in your workspace.
This page lists what to prepare for each application, which fields to fill in,
and how to connect an MCP server where each person signs in with their own
account.

For the general steps, testing, and activating, see
[Connect an application](./ai-agent-gateway.md#connect-an-integration). After
you connect an application, agents still can't use it until you allow its
operations in
[Application access](./ai-agent-gateway.md#control-what-agents-may-do-on-each-integration).

The steps on this page use the Agentic Gateway names. In a full Axiad Mesh
workspace, **Applications** is **Settings** > **Runtime AI Gateway** >
**Integrations**, and **Add application** is **Add integration**.

## Before you begin

- An admin account in your workspace.
- Admin access in each application you want to connect, or someone who has it.

## Two ways to connect

| Application | How you add it | Whose account the application sees |
| --- | --- | --- |
| Microsoft 365 | **Add application** | A dedicated app that you register in Microsoft Entra |
| Salesforce | **Add application** | An integration user in your Salesforce org |
| Atlassian (Jira and Confluence) | **Add application** | An Atlassian service account |
| GitHub | **Add MCP server** | The owner of the personal access token you enter |
| ServiceNow | **Add MCP server** | Each person's own ServiceNow account |

When you select **Add application** and choose an application, a **Prepare**
screen shows the setup steps first. Do them, then select **Continue** to enter
the details they give you. After you save, the **Set up** dialog offers
**Test connection** and **Activate**. **Show setup runbook** opens the same
steps again.

By default, applications added with **Add application** act as one shared
account. The application's own logs show that account, and the gateway records
the person the agent acted for.

## Microsoft 365

Agents can read and send mail, manage calendar events, and look up users. Mail
and calendar access is limited to each person's own mailbox and the shared
mailboxes you list.

You can let the gateway create the Microsoft Entra app for you, or create it by
hand.

**With Sign in to provision:**

1. Select **Add application**, then **Microsoft 365 (agent actions)**, and
   select **Continue** on the **Prepare** screen.
2. Enter a name and the **Directory (tenant) ID** of your Microsoft Entra
   tenant. Optionally, list **Shared mailboxes** that agents may use besides
   each person's own mailbox. Save.
3. In the **Set up** dialog, select **Sign in to provision**. A Microsoft 365
   administrator of that tenant signs in once and grants consent. This creates a
   dedicated app that has only the `User.Read.All` permission, and stores its
   key.
4. Select **Download Exchange RBAC script** and run it in Exchange Online
   PowerShell, as described below.
5. Select **Test connection**, then **Activate**.

**By hand:**

1. In the Microsoft Entra admin center, register a single-tenant application.
2. Add the Microsoft Graph **application** permission `User.Read.All` and
   nothing else, and grant admin consent. Don't add any mail or calendar
   permission in Entra: an Entra grant covers every mailbox in your tenant.
3. Under **Certificates & secrets**, upload a certificate. The gateway uses a
   certificate, never a client secret, for Microsoft 365.
4. In the form, enter the **Directory (tenant) ID**, the
   **Application (client) ID**, the **Certificate**, the
   **Certificate thumbprint**, the **Certificate private key**, and any
   **Shared mailboxes**.
5. Download and run the Exchange RBAC script, then test and activate.

**The Exchange RBAC script** is the only grant of mail and calendar access. It
limits the app to the shared mailboxes you listed and the people who use agents.
Before you run it, fill in the `AgentUsersRecipientFilter` placeholder with a
filter that matches those people. Until the script has run, mail and calendar
operations fail. Run it again after you enable more operations.

## Salesforce

Agents can search, read, and change Contacts, Accounts, Leads, and
Opportunities.

**Prepare in Salesforce:**

1. In Salesforce Setup, create an External Client App (or a Connected App) and
   enable OAuth.
2. Salesforce requires a callback URL, but this setup doesn't use it. Enter
   `https://login.salesforce.com/services/oauth2/success`.
3. Add the OAuth scope **Manage user data via APIs (api)**.
4. Enable the **Client Credentials Flow** and set **Run As** to a dedicated
   integration user. Give that user access only to Contacts, Accounts, Leads,
   and Opportunities.

**Enter in the form:**

| Field | What to enter |
| --- | --- |
| **Salesforce host** | Your My Domain host, for example `acme.my.salesforce.com`. |
| **Client ID** | The app's Consumer Key. |
| **Client secret** | The app's Consumer Secret. |
| **Identity mode** | Leave it as `service`, so every call runs as the integration user. |
| **Lead customer field** | Optional. Only to hold Lead operations to one customer's Account: the API name of the custom Lead field that stores the customer Account ID, for example `Customer_Account__c`. Most orgs leave it empty. |

To have Salesforce record the person instead of the integration user, set
**Identity mode** to `per_user_fallback`. Then also enable the
**JWT Bearer Flow** on the app, upload a certificate, enter its private key as
the **JWT signing key**, and pre-authorize the profiles or permission sets of the
people who use agents. A call runs as the person only when exactly one active
Salesforce user matches their email address. Otherwise it runs as the
integration user.

## Atlassian (Jira and Confluence)

Agents can search, read, create, and update Jira issues and Confluence pages, in
the projects and spaces you list.

**Prepare in Atlassian:**

1. Create or choose a dedicated service account. Give it access only to the Jira
   projects and Confluence spaces agents may use.
2. An Atlassian service account can't sign in, so an organization admin creates
   its API token in **Atlassian Administration**: open **Directory** >
   **Service accounts** > the account > **Create credentials** > **API token**.
   Tokens expire after 1 to 365 days. If you use a regular dedicated user
   account instead, sign in as it at **id.atlassian.com** > **Security** >
   **API tokens** and select **Create API token with scopes**.
3. Choose Jira and Confluence and select the scopes for the operations you plan
   to enable:
   - To read Jira issues: `read:jira-work`. To create, update, comment on, or
     transition issues, also `write:jira-work`.
   - To search Confluence: `search:confluence`. To read pages and list spaces:
     `read:confluence-content.all` and `read:confluence-space.summary`. To
     create or update pages, also `write:confluence-content`.

**Enter in the form:**

| Field | What to enter |
| --- | --- |
| **Site** | Your Atlassian site name: the `acme` in `acme.atlassian.net`. |
| **Service account email** | The service account's email address. |
| **API token** | The scoped API token. |
| **Jira projects** | The Jira project keys agents may use, for example `ENG`. |
| **Confluence spaces** | The Confluence space keys agents may use, for example `DOCS`. |

If a test reports missing permissions, create a new token with the scopes the
enabled operations need, and enter it with **Edit**.

## GitHub

GitHub connects as an MCP server.

1. In GitHub, create a personal access token. Its scopes, and any token policy of
   your GitHub organization, decide what agents can reach. GitHub Enterprise
   Server isn't supported.
2. Open **Applications**, select **Add MCP server**, and choose **GitHub**.
3. For authentication, choose **Bearer token** and paste the token.
4. Test the connection, review the tools, and select **Create and activate**.

## ServiceNow

ServiceNow connects as an MCP server where each person signs in with their own
ServiceNow account. Follow the steps in the next section. ServiceNow needs a
client that you register yourself:

1. In ServiceNow, register an OAuth inbound integration that uses the
   authorization code grant.
2. In the wizard, enter your **Instance** (your instance name) and the
   **Server name** of the MCP server in the MCP Server Console.
3. Add the redirect URL that the wizard shows to the client you registered.
4. Enter the client's **Client ID**, its **Client secret**, and the OAuth
   **Scopes** you granted that client.

## Connect an MCP server where each person signs in

Some MCP servers act as each person's own account at the vendor, instead of one
shared account. For these servers, the authentication method is
**Each person signs in (OAuth 2.0)**. In the catalog, ServiceNow, GitLab,
ClickUp, and Asana work this way.

1. Open **Applications**, select **Add MCP server**, and choose the server, or
   **Custom server** for a server that isn't in the catalog.
2. On **Connect**, enter the name and the server address. For a catalog server,
   the address and the authentication method are filled in for you. For a
   custom server, choose **Each person signs in (OAuth 2.0)**.
3. Set up the client that people sign in through:
   - If the vendor lets the gateway register itself, as GitLab and ClickUp do,
     there is no client ID or secret to enter. For a custom server, choose
     **Axiad registers itself with the server** under **Client registration**.
   - If you register a client with the vendor yourself, as ServiceNow and Asana
     require, the wizard shows a redirect URL. Select **Copy** and allow that
     redirect URL in the app you registered. Then enter its **Client ID**, and
     its **Client secret** if it has one. Leave the secret empty for a public
     client. For a custom server, choose
     **I registered a client with the vendor** under **Client registration**.
4. Enter at least one OAuth scope under **Scopes**, separated by spaces. A
   person can be asked to grant at most these scopes. Some catalog servers fill
   them in for you.
5. Select **Test connection**. The test checks that the server supports
   signing in. Nobody signs in during the test. The client ID and secret are
   proven only when a person first signs in.
6. Select **Continue** until the last step, then **Create and activate**. No
   tools are enabled yet, because the gateway can list a server's tools only
   after someone signs in.
7. Select **Tools** on the server's row, then **Sign in**, and sign in with your
   own account at the vendor. Come back to the **Tools** page, then review and
   enable the tools agents may use. Nothing is exposed to agents until you
   enable a tool.

Your own sign-in appears in **My connections**, where you can remove it later.
If the server later refuses your sign-in, the **Tools** page
asks you to sign in again to list its tools.

After you activate the server, each person connects their own account the first
time an agent needs it, and can see and remove their connections in
**My connections** in the account menu.

In an Agentic Gateway workspace, per-person servers currently work only for
admins, or anyone whose role includes **Connect my own AI accounts**. Invited
Members can't connect their own account, so their agents stop at the connect
prompt. Workspaces created before member invitations were turned on give
everyone the **Standard User** role, which includes it.

## Related guides

- [Govern AI agents with the Agentic Gateway](./ai-agent-gateway.md): connect
  applications, set policy, and review what agents did.
- [Connect Airtable as your first application](./connect-airtable.md): a worked
  example of connecting an MCP server with a token.
- [Connect your agent to the gateway](./connect-your-agent.md): add the gateway
  to an AI client.
