> ## 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 Fieldglass with OAuth 2.0 (SAML 2.0 Bearer Assertion) – StackOne Hub

> Link a SAP Fieldglass account in the StackOne Hub using OAuth 2.0 (SAML 2.0 Bearer Assertion). End-user guide to authorize the integration and start using SAP Fieldglass actions.

> [!WARNING]
>
> A user with the Configuration Manager role must create these credentials in SAP Fieldglass before the connection can be made.

## Find your API credentials

This method uses the SAML assertion grant. A SAML assertion generated for a valid SAP Fieldglass\
user is sent alongside the client ID and client secret, scoped to a company code.

**1. Create the API application key**

Sign in to SAP Fieldglass with the **Configuration Manager** role, then follow\
[Create API Application Key or Web Service](https://help.sap.com/docs/SAP_FIELDGLASS_INTEGRATION)\
in SAP's REST API integration guide.

<ul>
  <li>**Client ID**: a valid SAP Fieldglass username. This user's permissions govern what the integration can access.</li>
  <li>**Client Secret**: that user's application password, or a license key generated in SAP Fieldglass. A license key avoids issues with password rotation.</li>
  <li>**Application Key**: the **X-ApplicationKey** value. It is optional for Connector, Identity (SCIM), and Reporting APIs.</li>
</ul>

**2. Generate the SAML assertion**

Generate a SAML assertion for a valid SAP Fieldglass user in your identity provider, then copy the base64-encoded\
**SAML Assertion** across. It is sent as the Assertion parameter of the token request.

<ul>
  <li>A SAML assertion is short-lived, so update the stored value whenever your identity provider issues a new one.</li>
</ul>

**3. Find your company code and environment URL**

**Company Code** is your SAP Fieldglass company code, which is sent as the scope of the\
token request. The **Environment URL** is the hostname of your SAP Fieldglass environment,\
without the protocol and without a trailing slash.

<ul>
  <li>Format: `<company>.fgvms.com`</li>
  <li>Example: `www.fieldglass.net`</li>
  <li>Access tokens have limited lifetimes (the current default is 7200 seconds = 120 minutes).</li>
</ul>

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