> ## 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 SMART on FHIR (Multiple Companies) – StackOne Hub

> Link a InterSystems IRIS for Health account in the StackOne Hub using SMART on FHIR (Multiple Companies). End-user guide to authorize the integration and start using InterSystems IRIS for Health actions.

> [!WARNING]
>
> Registering the SMART client needs administrator access to the InterSystems IRIS Management Portal, or to the admin console of the external authorization server your FHIR server trusts.

## Find the FHIR server address

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

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

Sign in to your IRIS Management Portal and 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/smart_user-config-fhir-server-url.png?fit=max\&auto=format\&n=I9nTEOTYDON35hNB\&q=85\&s=7ee01a2da6fb8cfffebe1ee490e6d4d4)

## Register a SMART app on your server

These steps use the OAuth 2.0 server built into IRIS. On an external authorization server, create a confidential client with the same redirect URL, grant type, authentication type and scopes.

**1. Check the authorization server**

In the IRIS Management Portal, open **System Administration** > **Security** > **OAuth 2.0** > **Server**.

<ul>
  <li>**Supported grant types (check at least one)**: **Authorization code** selected</li>
  <li>**Return refresh token**: **If offline\_access scope requested**</li>
  <li>Click **Save**.</li>
  <li>Leave **Authorization URL** and **Token URL** empty when the **Issuer endpoint** has the same host as your FHIR server. Otherwise, add `/oauth2/authorize` and `/oauth2/token` to the **Issuer endpoint**, or use the endpoints of your external authorization server.</li>
</ul>

![The OAuth 2.0 Authorization Server Configuration page with the Issuer endpoint and the Authorization code grant type highlighted](https://mintcdn.com/stackone-60/I9nTEOTYDON35hNB/connectors/intersystemsfhir/images/smart_user-setup-authorization-server.png?fit=max\&auto=format\&n=I9nTEOTYDON35hNB\&q=85\&s=685309e2ef9a0d41a9eea12bce39d8a1)

**2. Add the scopes**

On the **Scopes** tab, check that `openid`, `fhirUser`, `offline_access`, `user/*.rs` and `user/*.cud` are listed. Patient sign-in also uses `launch/patient` and `patient/*.rs`. Add the ones the list is missing.

<ul>
  <li>Click **Add Supported Scope**.</li>
  <li>**Enter supported scope**: the scope, such as `offline_access`</li>
  <li>Click **OK**.</li>
  <li>Click **Save**.</li>
</ul>

![The Scopes tab with the SMART on FHIR scopes and the Add Supported Scope button highlighted](https://mintcdn.com/stackone-60/I9nTEOTYDON35hNB/connectors/intersystemsfhir/images/smart_user-setup-scopes.png?fit=max\&auto=format\&n=I9nTEOTYDON35hNB\&q=85\&s=5a80d86d43639f06d99bfc158d626ab0)

**3. Create the client**

On the server configuration page, open **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**: the **Callback URL** shown when you connect</li>
  <li>Click **OK**.</li>
  <li>**Supported grant types (check at least one)**: **Authorization code**</li>
  <li>**Authentication type**: **form encoded body**</li>
  <li>Click **Save**.</li>
</ul>

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

**4. 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/smart_user-setup-client-credentials.png?fit=max\&auto=format\&n=I9nTEOTYDON35hNB\&q=85\&s=bcc16f286f290e8d6dfc47f4953426eb)

## 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.