> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vibeflow.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SharePoint

> Manage SharePoint sites, files, lists, and Excel tables via Microsoft Graph

Microsoft SharePoint integration (via Microsoft Graph) for managing sites, drives, files, folders, sharing links, lists, list items, and Excel tables — including base64 file uploads, search and metadata filtering, and pre-authenticated download URLs.

**Required Configuration:**

* OAuth2 authentication through VibeFlow Cloud or your own Microsoft Entra ID app credentials via BYOK.

## BYOK (Bring Your Own Keys)

Use VibeFlow Cloud for the fastest setup, or use BYOK if you want each workspace to authorize through your own Microsoft Entra ID (Azure AD) app registration.

<Steps>
  <Step title="Open the SharePoint Connector">
    Go to **Settings** > **Connectors** in your VibeFlow dashboard and select **SharePoint**.

    Choose **Cloud (Recommended)** to use VibeFlow-managed credentials, or choose **Your Own Credentials** to configure BYOK.
  </Step>

  <Step title="Register an Application in Microsoft Entra ID">
    Go to the [Microsoft Entra admin center](https://entra.microsoft.com) and navigate to **Identity** > **Applications** > **App registrations**. Click **New registration**.

    * **Name**: Choose a name for your app
    * **Supported account types**: Choose the option that matches your tenant setup. For multi-tenant access, use **Accounts in any organizational directory and personal Microsoft accounts**.
    * **Redirect URI**: Web →
      ```
      https://integration.vibeflow.ai/api/oauth/callback/sharepoint
      ```
  </Step>

  <Step title="Configure API Permissions">
    In your app registration, go to **API permissions** > **Add a permission** > **Microsoft Graph** > **Delegated permissions** and add the following scopes:

    ```
    offline_access
    openid
    email
    User.Read
    Sites.Read.All
    Sites.ReadWrite.All
    Files.Read.All
    Files.ReadWrite.All
    ```

    You can limit these scopes for least-privilege access, but SharePoint actions that depend on omitted permissions will not work. For example, file write operations require `Files.ReadWrite.All`, and site/list write operations require `Sites.ReadWrite.All`.

    Click **Grant admin consent** if your tenant requires it.
  </Step>

  <Step title="Create a Client Secret">
    Go to **Certificates & secrets** > **Client secrets** > **New client secret**. Copy the secret **Value** immediately — it will not be shown again.
  </Step>

  <Step title="Add Credentials to VibeFlow">
    In the VibeFlow SharePoint connector modal, select **Your Own Credentials** and paste:

    * **Client ID**: the **Application (client) ID** from your Microsoft Entra app registration
    * **Client Secret**: the client secret **Value** from **Certificates & secrets**

    Your credentials are encrypted by default and stored securely.
  </Step>

  <Step title="Authorize SharePoint">
    Continue the connector setup and sign in with the Microsoft account that should grant SharePoint access. After consent is complete, you can use SharePoint actions in your workflows.
  </Step>
</Steps>

<Info>
  BYOK is ideal for businesses that require data isolation, custom branding, or stricter compliance requirements.
</Info>

## Available Endpoints

<AccordionGroup>
  <Accordion title="GET /api/actions/sharepoint/me">
    Get information about the current authenticated user.
  </Accordion>

  <Accordion title="GET /api/actions/sharepoint/sites">
    List SharePoint sites accessible to the user.
  </Accordion>

  <Accordion title="POST /api/actions/sharepoint/sites/search">
    Search SharePoint sites by keyword.
  </Accordion>

  <Accordion title="POST /api/actions/sharepoint/sites/get">
    Get a specific SharePoint site.
  </Accordion>

  <Accordion title="POST /api/actions/sharepoint/files/list">
    List files in a folder.
  </Accordion>

  <Accordion title="POST /api/actions/sharepoint/files/get">
    Get a file by its ID.
  </Accordion>

  <Accordion title="POST /api/actions/sharepoint/files/find">
    Find a file by name.
  </Accordion>

  <Accordion title="POST /api/actions/sharepoint/files/search">
    Search files across a site or drive.
  </Accordion>

  <Accordion title="POST /api/actions/sharepoint/files/search-and-filter">
    Search and filter files using metadata.
  </Accordion>

  <Accordion title="POST /api/actions/sharepoint/files/metadata">
    Retrieve metadata for a file.
  </Accordion>

  <Accordion title="POST /api/actions/sharepoint/files/download">
    Download a file (returns a pre-authenticated download URL).
  </Accordion>

  <Accordion title="POST /api/actions/sharepoint/files/download-batch">
    Download multiple files in a single batch request.
  </Accordion>

  <Accordion title="POST /api/actions/sharepoint/files/select">
    Select files for further operations.
  </Accordion>

  <Accordion title="POST /api/actions/sharepoint/folders">
    Create a new folder.
  </Accordion>

  <Accordion title="POST /api/actions/sharepoint/files">
    Upload a file (supports base64 file content).
  </Accordion>

  <Accordion title="POST /api/actions/sharepoint/files/sharing-links">
    Create a sharing link for a file.
  </Accordion>

  <Accordion title="POST /api/actions/sharepoint/lists">
    Create a new list on a SharePoint site.
  </Accordion>

  <Accordion title="POST /api/actions/sharepoint/lists/items">
    Create a new item in a list.
  </Accordion>

  <Accordion title="PATCH /api/actions/sharepoint/lists/items">
    Update an existing list item.
  </Accordion>

  <Accordion title="POST /api/actions/sharepoint/lists/items/search">
    Find files in a list using metadata filters.
  </Accordion>

  <Accordion title="POST /api/actions/sharepoint/excel/table">
    Read an Excel table stored in SharePoint.
  </Accordion>
</AccordionGroup>
