> ## 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 Apple Business Manager with OAuth 2.0 (Client Credentials) – StackOne Hub

> Link a Apple Business Manager account in the StackOne Hub using OAuth 2.0 (Client Credentials). End-user guide to authorize the integration and start using Apple Business Manager actions.

> [!WARNING]
>
> Only an Apple Business user with the Organization Administrator role can create an API account, and the client assertion must be re-signed and re-entered before its expiry date or every call starts failing.

## Create an API account

Create an API account in Apple Business. Apple generates the key pair and gives you the private key to download.

**1. Open API accounts**

Sign in to [Apple Business](https://business.apple.com) with a user who has the Organization Administrator role, choose **Settings**, then **API**.

**2. Add the account**

Select **Add API Account**, enter a name such as `StackOne`, select its role, then select **Next**.

**3. Download the private key**

Select **Generate & Download** to generate and download the key. The key's filename ends in `.pem`, and you generate it only once.

**4. Copy the client id**

Select **Edit** on the API account to view its **Client ID** and **Key ID**.

## Sign a client assertion

Apple's OAuth implementation guide includes a Python script that signs a client assertion JWT (ES256) from the downloaded private key.

**1. Run the sample script**

Follow the sample script on [Apple's OAuth implementation guide](https://developer.apple.com/documentation/apple-school-and-business-manager-api/implementing-oauth-for-the-apple-school-manager-and-apple-business-api), passing your client id, key id and downloaded private key. Choose an expiry up to 180 days out.

<ul>
  <li>The script prints a signed JWT string. Copy it in full.</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/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.