SharePoint/OneDrive

Connect SharePoint and OneDrive directly in MeinGPT — via Microsoft sign-in, no Azure app of your own

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) — you do not configure a client_id, client_secret, or refresh token manually.

Sign in with Microsoft

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

Confirm permissions

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

Choose a site, or a drive and folder

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

Attention

The list of available sites is based on Microsoft's search index (Microsoft Graph /sites?search=*), plus the sites you follow in SharePoint. Microsoft often adds a newly created site to its search index only after a few minutes, sometimes after hours. If a site is missing, paste its address into the search field, e.g. https://company.sharepoint.com/sites/Project or the address of a document library. MeinGPT resolves it directly with Microsoft, without the search index, and shows the site with its libraries. If the address points to a library, that library is listed first.

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.

FieldRequiredDescription
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
base_folder_id–ID of the selected folder; the source follows the folder through renames and moves

Synchronization

  • MeinGPT uses the OAuth refresh token to access OneDrive/SharePoint content.
  • Sync runs pull files from the selected drive scope and ingest incrementally.
  • Large libraries are listed once on the first sync and then fetched in batches of up to 1,000 files; the next batch starts right away rather than at the next scheduled run.
  • Renaming or moving a folder is safe: the source follows it, and files already indexed are not fetched again.
  • A single file that repeatedly fails to download is set aside after five attempts and shown with its reason in the source's file list. It does not hold up the rest of the sync, and deletions keep arriving. If the file changes in SharePoint, it is tried again.
  • When Microsoft throttles requests, MeinGPT waits for the time Microsoft names; the sync then continues automatically.
  • If tokens rotate, runtime refresh updates are applied automatically during operation. Reconnecting a source while a sync is running keeps your new sign-in.

SharePoint Site Sync (By URL)

Alongside the drive-scoped onedrive type above, there is a second SharePoint mode that syncs a whole SharePoint site: sharepoint_site. You choose it in the picker with "Complete SharePoint Site". If the site does not appear in the list, paste its address into the search field (see the note above); this works for sites under /sites/ as well as /teams/.

FieldRequiredDescription
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

Troubleshooting

Messages on the source page

The source page names the specific cause and the matching fix:

MessageWhat to do
Sign-in expired, password changed or sessions revokedReconnect the source
New sign-in with MFA requiredReconnect the source
A conditional access policy blocks the sign-inIT has to allow MeinGPT in the policy
Connected account disabled or deletedReconnect the source with another account
SharePoint site deleted or movedReconnect the site or remove the source
Connected folder deletedChoose another folder or remove the source
No access to the site or library anymoreGive the connected account access again, or connect with another account
Microsoft is throttling requestsNothing — the sync continues automatically

"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 your organization doesn't let users consent to apps themselves, a Global or Application Administrator needs to grant one-time consent. The most reliable way is for that person to connect this data source, or specifically the SharePoint connector under Microsoft 365, in MeinGPT themselves and check "Consent on behalf of your organization" on the Microsoft permission screen before approving. Consent granted through a different Microsoft connector, such as Outlook or Teams, does not cover this data source's Sites.Read.All permission. 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.

Do not use the "Grant admin consent" button in the Entra admin center for this. It only grants the base permissions fixed in the MeinGPT app registration and replaces the organization-wide consent, so permissions already granted, such as Sites.Read.All for this data source or the Microsoft 365 Connector permissions, disappear afterward.

Was this page helpful?