> ## 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 Microsoft OneDrive with OAuth 2.0 (Client Credentials) – StackOne Hub

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

> [!WARNING]
>
> Registering the application needs at least the Application Developer role in Microsoft Entra ID, and granting admin consent needs a Global Administrator or Privileged Role Administrator. App-only access cannot reach the signed-in user's own drive, so the actions that resolve it are unavailable with this authentication type.

Select Actions to adjust the guideSome actions may require additional configuration in the provider to be accessible. Choose the actions you need and the guide will be updated.

Select all
Clear

ActionScope(s)

Loading actions...No actions match your search.

Dynamic Guide URL

Copy URL

Scopes Selected

<pre role="textbox" aria-readonly="true" tabIndex="0" />

Separator

Copy scopes

## Register an application in Microsoft Entra ID

An app registration in Microsoft Entra ID holds the credentials and the Microsoft Graph application permissions for Microsoft OneDrive. Application permissions apply without a signed-in user, so no redirect URI is needed.

**1. Start the registration**

Sign in to the [Microsoft Entra admin center](https://entra.microsoft.com), then open **Entra ID** > **App registrations**.

<ul>
  <li>Click **New registration**.</li>
</ul>

![The App registrations page with the New registration button highlighted](https://mintcdn.com/stackone-60/_aTsLEcZdQ0jUU3g/connectors/microsoftonedrive/images/client-credentials-config-app-registrations.png?fit=max\&auto=format\&n=_aTsLEcZdQ0jUU3g\&q=85\&s=2cf2dbb5ac907cdfbbe3ec1d78186ae3)

**2. Fill in the registration form**

Leave **Redirect URI** empty — the client credentials flow never sends the user to a sign-in screen.

<ul>
  <li>**Name**: `StackOne Integration`</li>
  <li>**Supported account types**: **Single tenant only** — the application permissions apply to one directory</li>
  <li>Click **Register**.</li>
</ul>

![The Register an application form with Name, Supported account types and the Register button highlighted](https://mintcdn.com/stackone-60/_aTsLEcZdQ0jUU3g/connectors/microsoftonedrive/images/client-credentials-config-register-application.png?fit=max\&auto=format\&n=_aTsLEcZdQ0jUU3g\&q=85\&s=78824cf7b1e58c5d92f85e83aeb6d76b)

## Add the Microsoft Graph application permissions

Application permissions are granted to the application itself rather than to a user, so an administrator consents to them once and they apply across the directory.

**1. Open the permission picker**

From the left menu under **Manage**, select **API permissions**.

<ul>
  <li>Click **Add a permission**.</li>
  <li>Select **Microsoft Graph**.</li>
  <li>Select **Application permissions**.</li>
</ul>

![The Request API permissions panel with the Application permissions card highlighted](https://mintcdn.com/stackone-60/_aTsLEcZdQ0jUU3g/connectors/microsoftonedrive/images/client-credentials-config-application-permissions.png?fit=max\&auto=format\&n=_aTsLEcZdQ0jUU3g\&q=85\&s=a1f9d3977b50e966a882ee2a5cbbd03d)

**2. Select the permissions**

Enables actions: Check In Drive Item, Check Out Drive Item, Copy Drive Item, Create Folder, Create Sharing Link, Create User, Delete Drive Item, Delete Item Permission, Download Drive Item, Download Item Version, Get Drive, Get Drive Item, Get Drive Item By Path, Get Drive Item Thumbnails, Get Drive Root Folder, Get Item Permission, Get Item Version, Get Special Folder, Get User, List Drive Item Children, List Drive Root Children, List Item Permissions, List Item Versions, List User's Drives, List Users, Move Drive Item, Restore Drive Item, Search Drive Items, Send Sharing Invitation, Update Drive Item, Update Item Permission, Upload File To Drive

Use **Select permissions** to filter the catalog, then select the checkbox beside each permission.

<ul>
  <li>Click **Add permissions**.</li>
</ul>

![The Select permissions list filtered to Files with Files.Read.All and Files.ReadWrite.All selected](https://mintcdn.com/stackone-60/_aTsLEcZdQ0jUU3g/connectors/microsoftonedrive/images/client-credentials-config-select-permissions.png?fit=max\&auto=format\&n=_aTsLEcZdQ0jUU3g\&q=85\&s=51eddd21e67545f79bd6c01348f09233)

<ul>
  <li>
    Files.Read.All
  </li>

  <li>
    Files.ReadWrite.All
  </li>

  <li>
    User.Read.All
  </li>

  <li>
    User.ReadWrite.All
  </li>
</ul>

**3. Grant admin consent**

Application permissions take effect only once an administrator consents to them, which is why each one shows **Not granted** until then.

<ul>
  <li>Click **Grant admin consent for \[your organization]**.</li>
  <li>Click **Yes** on **Grant admin consent confirmation.**</li>
  <li>Check that the **Status** column reads **Granted for \[your organization]** for every permission.</li>
</ul>

![The Configured permissions table showing the application permissions with the Grant admin consent button highlighted](https://mintcdn.com/stackone-60/_aTsLEcZdQ0jUU3g/connectors/microsoftonedrive/images/client-credentials-config-grant-admin-consent.png?fit=max\&auto=format\&n=_aTsLEcZdQ0jUU3g\&q=85\&s=77f11ec2bd34fbb1266e5be0bdf0d5bd)

## Copy the credentials

The application identifies itself with three values from the registration — two from the **Overview** page and a secret you create.

**1. Copy the Client ID and Tenant ID**

On the **Overview** page, copy both values into StackOne Hub.

<ul>
  <li>**Client ID**: the **Application (client) ID**</li>
  <li>**Tenant ID**: the **Directory (tenant) ID**</li>
</ul>

![The application Overview page with the Application (client) ID and Directory (tenant) ID values highlighted](https://mintcdn.com/stackone-60/_aTsLEcZdQ0jUU3g/connectors/microsoftonedrive/images/client-credentials-config-overview-ids.png?fit=max\&auto=format\&n=_aTsLEcZdQ0jUU3g\&q=85\&s=a98427aef817623904018296506f6eee)

**2. Create a client secret**

From the left menu under **Manage**, select **Certificates & secrets**, then open the **Client secrets** tab.

<ul>
  <li>Click **New client secret**.</li>
  <li>**Description**: `Integration with StackOne`</li>
  <li>**Expires**: an expiration period</li>
  <li>Click **Add**.</li>
</ul>

![The Certificates and secrets page with the Client secrets tab and the New client secret button highlighted](https://mintcdn.com/stackone-60/_aTsLEcZdQ0jUU3g/connectors/microsoftonedrive/images/client-credentials-config-new-client-secret.png?fit=max\&auto=format\&n=_aTsLEcZdQ0jUU3g\&q=85\&s=08fee87452ceb26f5d00383b084e56f8)

**3. Copy the Client Secret**

Copy the **Value** of the new secret into StackOne Hub.

<ul>
  <li>The **Value** is only displayed when the secret is created and cannot be retrieved later.</li>
  <li>Copy the **Value**, not the **Secret ID**.</li>
</ul>

![The client secrets table with the copy button beside the secret Value highlighted](https://mintcdn.com/stackone-60/_aTsLEcZdQ0jUU3g/connectors/microsoftonedrive/images/client-credentials-config-client-secret-value.png?fit=max\&auto=format\&n=_aTsLEcZdQ0jUU3g\&q=85\&s=c8cf2b0070171fee0bf7978a0c561a57)

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