Skip to main content

SharePoint + OneDrive

Let an Assistant read and optionally write files in a SharePoint site or a user's OneDrive. Like Google Drive, it is a reusable connection configured under Project settings → Integrations (or Organization settings → Integrations to share it with every project) and selected per Assistant. Authentication is app-only through a Microsoft Entra (Azure AD) app registration.

Register the Microsoft Entra app

  1. In the Azure portal open Microsoft Entra ID → App registrations → New registration.

  2. Fill in:

    FieldValue
    Namee.g. MINEO SharePoint Assistant
    Supported account typesAccounts in this organizational directory only (single tenant)
    Redirect URIleave empty — MINEO uses app-only flow
  3. From the new app's Overview copy the Application (client) ID and Directory (tenant) ID — you will paste them into MINEO.

  4. Open Certificates & secrets → New client secret, set a description and expiry, and copy the Value immediately (it is shown only once).

  5. Open API permissions → Add a permission → Microsoft Graph → Application permissions and add:

    PermissionRequired forNotes
    Sites.Selectedlist, read, create, delete, renameGranted per-site (next step)
    Sites.Read.All (or Sites.ReadWrite.All)sharepoint_search_files onlyTenant-wide; Graph does not honor Sites.Selected on /root/search
  6. Click Grant admin consent for <tenant> at the top of the permissions page.

  7. Authorize the app on the target site. Sites.Selected requires an explicit per-site grant. A tenant admin runs this once against the Graph API (replace the placeholders):

    POST https://graph.microsoft.com/v1.0/sites/{site-id}/permissions
    Authorization: Bearer {admin-token}
    Content-Type: application/json

    {
    "roles": ["write"],
    "grantedToIdentities": [{
    "application": {
    "id": "{client-id}",
    "displayName": "MINEO SharePoint Assistant"
    }
    }]
    }

    Use "read" instead of "write" if the Assistant only needs read access.

warning

Search and Sites.Selected. Microsoft Graph documents that /drive/root/search(q=) does not support Sites.Selected. If you provision the app with Sites.Selected only, every other tool works but sharepoint_search_files returns 403 with an actionable hint to add Sites.Read.All tenant-wide.

Find the Site ID

The site id is a comma-separated triple {hostname},{siteCollectionId},{webId}. Get it with one Graph call against the site's hostname/path:

GET https://graph.microsoft.com/v1.0/sites/{hostname}:/sites/{site-path}
Authorization: Bearer {token}

For example, https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com:/sites/Marketing returns the site object whose id field is exactly what MINEO expects.

info

A user's OneDrive for Business is itself a site collection, so Site ID can point at either a SharePoint site or a OneDrive.

Create the connection in MINEO

Go to Project settings → Integrations (or Organization settings → Integrations) and add a SharePoint integration:

FieldDescription
NameA label to identify this connection.
Tenant IDThe Directory (tenant) ID from the app's Overview.
Client IDThe Application (client) ID from the app's Overview.
Client secretThe secret Value copied in step 4. Stored write-only and never shown again.
Site IDThe target site id, e.g. contoso.sharepoint.com,<siteCollectionId>,<webId>. Required.

Use it in an Assistant

  1. Open the Assistant's Integrations tab and pick the connection under SharePoint + OneDrive → Connection.
  2. Optionally set a Document library (drive) ID to target a specific library; leave empty for the site's default drive.
  3. Enable SharePoint & OneDrive write access to let the Assistant create, rename, and delete files.