> ## 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 SAP S/4HANA with OAuth 2.0 – StackOne Hub

> Link a SAP S/4HANA account in the StackOne Hub using OAuth 2.0. End-user guide to authorize the integration and start using SAP S/4HANA actions.

<Warning>Administrator access to the SAP S/4HANA Cloud tenant is required to create Communication Arrangements and Communication Users. Trial systems do NOT support Communication Arrangements — a paid or partner-provisioned sandbox is required.</Warning>

<section data-guide-section data-guide-scopes="">
  <h2>Locate your System ID</h2>

  <p>The System ID is the 6-character tenant prefix in your S/4HANA Cloud URL.</p>

  <Steps>
    <Step title="Find the System ID">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Open your SAP S/4HANA Cloud Fiori launchpad URL in a browser.</p>

        <ul>
          <li>Look at the URL, e.g. `https://my123456.s4hana.cloud.sap/sap/fiori`</li>
          <li>The System ID is the 6 digits after `my` and before `.s4hana.cloud.sap` — in the example: `123456`</li>
          <li>Enter ONLY the digits (no `my` prefix, no `.s4hana.cloud.sap` suffix) into the System ID field</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Create the Communication User</h2>

  <p>The Communication User is the technical identity that issues the OAuth credentials.</p>

  <Steps>
    <Step title="Open Maintain Communication Users">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>In the Fiori launchpad, search for and open the <strong>Maintain Communication Users</strong> app.</p>
      </div>
    </Step>

    <Step title="Create a new user">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Click <strong>New</strong> to create a Communication User.</p>

        <ul>
          <li>Enter a User Name (e.g. `STACKONE_INTEGRATION`)</li>
          <li>Click <strong>Propose Password</strong> and copy the generated password — it will become the OAuth Client Secret</li>
          <li>Click <strong>Create</strong></li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Create the Communication Arrangements</h2>

  <p>Each business API is enabled by a Communication Arrangement bound to a Scenario.</p>

  <Steps>
    <Step title="Open Communication Arrangements">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Search for and open the <strong>Communication Arrangements</strong> app.</p>
      </div>
    </Step>

    <Step title="Create arrangement for Business Partner">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Click <strong>New</strong>, enter Scenario `SAP_COM_0008`, give it an Arrangement Name, then click <strong>Create</strong>.</p>

        <ul>
          <li>Under <strong>Inbound Communication</strong>, set Authentication Method to `User ID and Password` — then switch the dropdown to `OAuth 2.0`</li>
          <li>Assign the Communication User you created earlier</li>
          <li>Save the arrangement</li>
        </ul>
      </div>
    </Step>

    <Step title="Create arrangement for Sales Order">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Repeat for Scenario `SAP_COM_0109` (Sales Order).</p>
      </div>
    </Step>

    <Step title="Create arrangement for Product">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Repeat for Scenario `SAP_COM_0009` (Product Master).</p>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Retrieve OAuth credentials</h2>

  <p>The OAuth Client ID and Client Secret come from the Communication Arrangement.</p>

  <Steps>
    <Step title="Open one of the arrangements">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>In Communication Arrangements, open the SAP\_COM\_0008 arrangement.</p>
      </div>
    </Step>

    <Step title="View OAuth 2.0 details">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Under <strong>Inbound Communication</strong>, click the OAuth 2.0 Details link.</p>

        <ul>
          <li>Copy the <strong>OAuth 2.0 Client ID</strong> — this is your Client ID</li>
          <li>The <strong>Client Secret</strong> is the password you generated when creating the Communication User</li>
          <li>Do not regenerate the password — it would invalidate all existing arrangements</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Verify Communication Arrangement is active</h2>

  <p>Each arrangement must be active for the OAuth client to access the corresponding APIs.</p>

  <Steps>
    <Step title="Confirm status">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>In Communication Arrangements, the Status column for each of SAP\_COM\_0008, SAP\_COM\_0009, and SAP\_COM\_0109 should read <strong>Active</strong>.</p>
      </div>
    </Step>
  </Steps>
</section>

<div data-whitelabel-hide>
  <h2>Linking the Account from the Hub</h2>

  <Steps>
    <Step title="Navigate to the Hub">
      Use one of the three <a href="/guides/accounts-section#linking-accounts">Linking Account Methods</a> to access the Hub.
    </Step>

    <Step title="Connect">
      <ul>
        <li>Click <strong>Connect</strong></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>
    </Step>
  </Steps>

  <p>If the account linking is successful, you will see the newly linked account in your <a href="/guides/accounts-section">Accounts</a> page.</p>
</div>
