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

# Connect InterSystems IRIS for Health with OAuth 2.0 Client Credentials (System) – StackOne Hub

> Link a InterSystems IRIS for Health account in the StackOne Hub using OAuth 2.0 Client Credentials (System). End-user guide to authorize the integration and start using InterSystems IRIS for Health actions.

> [!WARNING]
>
> Requires administrator access to the InterSystems IRIS Management Portal. The OAuth 2.0 server must already allow the **Client credentials** grant type and list the `system/*.rs` scope, plus `system/*.cud` for writes, on its **Scopes** tab.

## Get a client ID and secret for this account

Each linked account uses its own confidential client on the authorization server your FHIR server trusts. These steps use the OAuth 2.0 server built into IRIS. On an external server, give the client the same grant type, authentication type and scopes.

**1. Create the client**

Sign in to your IRIS Management Portal and open **System Administration** > **Security** > **OAuth 2.0** > **Server** > **Client Descriptions**.

<ul>
  <li>Click **Create Client Description**.</li>
  <li>**Name**: `StackOne`</li>
  <li>**Client type**: **Confidential**</li>
  <li>Click **Add URL**.</li>
  <li>**Enter URL**: any https URL you own, such as your organization's website. IRIS requires one, and client credentials never uses it.</li>
  <li>Click **OK**.</li>
</ul>

![The Client Description form with Name, Confidential, Redirect URLs, Client credentials and form encoded body highlighted](https://mintcdn.com/stackone-60/I9nTEOTYDON35hNB/connectors/intersystemsfhir/images/oauth_client_credentials-config-client-description.png?fit=max\&auto=format\&n=I9nTEOTYDON35hNB\&q=85\&s=ca8e8d27538f906f5a5c0cbfe51d35ae)

**2. Set the grant and authentication types**

These settings on the same form decide how the client gets its tokens.

<ul>
  <li>**Supported grant types (check at least one)**: **Client credentials** only</li>
  <li>**Authentication type**: **form encoded body**</li>
  <li>Click **Save**.</li>
</ul>

**3. Copy the client credentials**

In the **OAuth 2.0 Server** list, click the new client's name.

<ul>
  <li>Open the **Client Credentials** tab.</li>
  <li>Copy the **Client ID** across.</li>
  <li>Click **show** next to **Client secret**.</li>
  <li>Copy the **Client secret** across.</li>
</ul>

![The Client Credentials tab with the Client ID field and the show link highlighted](https://mintcdn.com/stackone-60/I9nTEOTYDON35hNB/connectors/intersystemsfhir/images/oauth_client_credentials-config-client-credentials.png?fit=max\&auto=format\&n=I9nTEOTYDON35hNB\&q=85\&s=2615d7d1ba457613e29995b045005c53)

## Find the server addresses

IRIS accepts tokens only over https, for the exact FHIR address the token was issued for.

**1. Find the FHIR R4 Base URL**

In the Management Portal, open **Health** > your FHIR namespace > **FHIR Server Management**. The server card shows the endpoint path after **URL:**.

<ul>
  <li>Format: `https://{IRIS web server host}{URL path}`</li>
  <li>Example: if you reach IRIS at `https://iris.example.org` and the card shows `URL: /csp/healthshare/fhirserver/fhir/r4`, your **FHIR R4 Base URL** is `https://iris.example.org/csp/healthshare/fhirserver/fhir/r4`</li>
  <li>Check it against the `implementation.url` value at `{FHIR R4 Base URL}/metadata`, and use that value exactly, including any port it shows.</li>
</ul>

![The FHIR Server Management page with the server card's URL highlighted](https://mintcdn.com/stackone-60/I9nTEOTYDON35hNB/connectors/intersystemsfhir/images/oauth_client_credentials-config-fhir-server-url.png?fit=max\&auto=format\&n=I9nTEOTYDON35hNB\&q=85\&s=849aa5fabbc61f1328e23b89d1b342a9)

**2. Find the Token URL**

Open **System Administration** > **Security** > **OAuth 2.0** > **Server** and read the **Issuer endpoint**. Leave **Token URL** empty when the issuer has the same host as your FHIR server.

<ul>
  <li>Format: `{Issuer endpoint}/oauth2/token`</li>
  <li>Example: if the **Issuer endpoint** is `https://auth.example.org`, your **Token URL** is `https://auth.example.org/oauth2/token`</li>
  <li>With an external authorization server, use its token endpoint.</li>
</ul>

![The OAuth 2.0 Authorization Server Configuration page with the issuer endpoint and Client credentials grant type](https://mintcdn.com/stackone-60/I9nTEOTYDON35hNB/connectors/intersystemsfhir/images/oauth_client_credentials-config-authorization-server.png?fit=max\&auto=format\&n=I9nTEOTYDON35hNB\&q=85\&s=60c451eef5b1e2c8e5fba2e7b76b949f)

## Link the Account

**1. Connect**

<ul>
  <li>Click **Connect**.</li>
  <li>If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider's authorization flow.</li>
  <li>Once authorization is successful, you will see a confirmation popup.</li>
</ul>

**2. Use Actions**

Connect an AI platform to the linked account's actions. See [AI Platforms](https://docs.stackone.com/ai-platforms/overview.md).

Other ways to call actions are listed in [Protocols & SDKs](https://docs.stackone.com/connect/protocols-and-sdks.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.