---
title: "SharePoint/OneDrive"
description: "Connect SharePoint and OneDrive directly in meinGPT — via Microsoft sign-in, no Azure app of your own"
canonical_url: "https://meingpt.com/en/docs/integrations/sources/sharepoint"
language: en
---

# SharePoint/OneDrive

## Set up in meinGPT

Open **Settings → Data sources**, click **Add data source**, and choose SharePoint/OneDrive.

No separate Azure app registration is needed. meinGPT connects through its own, already-registered multi-tenant Azure app (the same "meinGPT Enterprise Application" used by the [Microsoft 365 Connector](/en/docs/integrations/connectors/microsoft365)) — you do not configure a `client_id`, `client_secret`, or refresh token manually.

meinGPT opens a popup window and redirects to `login.microsoftonline.com`; sign in with a work, school, or university account.

The requested scopes are `Sites.Read.All`, `User.Read`, and `offline_access`. If your organization requires admin consent for new applications, an administrator needs to grant it once — see [Troubleshooting](#troubleshooting) below.

Once signed in, meinGPT shows the available SharePoint sites; select an entire site, or a specific drive and folder.

The list of available sites is based on Microsoft's search index (Microsoft Graph `/sites?search=*`), not a complete enumeration of every site you have access to in Microsoft 365. Team sites Microsoft hasn't yet indexed — even with correct permissions and correct search-visibility settings — may not appear in this list, even though you can access them directly in SharePoint. If a site you should be able to access is missing, use the [`sharepoint_site` mode](#sharepoint-site-sync-by-url) below, which connects the site directly by its URL.

SharePoint/OneDrive runs as a Cloud data source; it needs no Outpost of your own, and this source type is not available for on-premise Outpost deployments.

## Internal configuration structure

The field table below describes the data source's internal configuration structure. As a customer you don't fill in these fields yourself — they're populated automatically when you connect through the Microsoft sign-in above.

| Field | Required | Description |
| --- | --- | --- |
| `client_id` | – | Application client ID (default: the meinGPT Enterprise Application) |
| `client_secret` | – | Application client secret |
| `refresh_token` | ✅ | OAuth refresh token |
| `drive_id` | ✅ | OneDrive ID |
| `drive_type` | ✅ | Drive type (`personal`, `business`, `documentLibrary`) |
| `tenant_id` | – | Optional custom tenant |
| `base_path` | – | Optional folder path |

## Synchronization

- meinGPT uses the OAuth refresh token to access OneDrive/SharePoint content.
- Sync runs pull files from the selected drive scope and ingest incrementally.
- If tokens rotate, runtime refresh updates are applied automatically during operation.

## SharePoint Site Sync (By URL)

Alongside the drive-scoped `onedrive` type above, there is a second SharePoint mode that syncs one specific SharePoint site, selected directly by URL rather than through the drive picker in step 3 above: `sharepoint_site`. This mode also works when a site doesn't show up in the sites list, since `sharepoint_site` resolves the site directly by URL instead of relying on Microsoft's search index.

| Field | Required | Description |
| --- | --- | --- |
| `site_url` | ✅ | SharePoint URL, e.g. `https://company.sharepoint.com`, or a specific site such as `https://company.sharepoint.com/sites/sales` |
| `site_id` | ✅ | Microsoft Graph site ID of the selected SharePoint site |
| `refresh_token` | ✅ | OAuth refresh token |
| `client_id` | ✅ | Azure AD application client ID |
| `client_secret` | ✅ | Azure AD application client secret |
| `base_path` | – | Optional folder path |

meinGPT sets this mode up together with you.

## Troubleshooting

### "Could not verify account" after signing in with Microsoft

This message appears when the OAuth popup does not return a valid authorization code to meinGPT after sign-in. The most common causes:

- **Missing admin consent**: If nobody in your organization has used a Microsoft integration in meinGPT before, a Global or Application Administrator first needs to grant one-time consent to the meinGPT Enterprise Application in the [Entra admin center](https://entra.microsoft.com/), under **Enterprise applications → Permissions**. Without that consent, Microsoft shows an error inside the popup ("Admin approval required," often with the code "AADSTS65001") instead of completing sign-in - if you close the popup at that point, meinGPT treats it as a cancelled sign-in and shows "Could not verify account."
- **Popup blocked or closed early**: Check that your browser allows popups for meinGPT, and don't close the Microsoft window before it redirects back to meinGPT.
- **Personal Microsoft account used**: Only work, school, or university accounts are supported.

Consent granted in the Entra admin center applies organization-wide and covers both this data source and the [Microsoft 365 Connector](/en/docs/integrations/connectors/microsoft365) - if either path is already working for your organization, admin consent is usually not the issue.
