Supported File Types
The connector extracts text from these formats:- Office documents:
.docx,.docm,.doc,.pptx,.ppt,.xlsx,.xls - PDFs:
.pdf - OpenDocument:
.odt,.odp,.ods,.rtf - Plain text:
.txt,.md,.csv,.json,.xml,.html - Other:
.epub
.pptx imports also include chart data and speaker notes.
Files larger than 50 MB are skipped. Files of other types appear in the tree without content.
Choose a permission mode
AGO supports two ways to grant access to SharePoint, set in Knowledge > Sources > Connections > SharePoint:Setup — All sites mode (simple)
Register an app in Microsoft Entra ID
- Go to the Azure Portal > Microsoft Entra ID > App registrations > New registration
- Give it a name (e.g. “AGO SharePoint Connector”)
- Choose Single tenant (or Multitenant if you serve multiple Microsoft tenants)
Add API permissions
Sites.Read.AllFiles.Read.All
Create a client secret
Configure AGO
- Tenant ID
- Client ID
- Client Secret
Create a knowledge source
- Go to Knowledge > Sources and click Create New Source
- Select
sharepointas the Source Type - Pick a site from the SharePoint Site list
- Optionally pick a Document Library and a folder, or leave them empty to import the default library
- Click Save, then open the source and click Sync Source
Setup — Selected sites mode (limited scope)
In this mode AGO can only access the SharePoint sites your admin has explicitly granted. Microsoft Graph does not return the list of granted sites, so you list them in AGO’s settings.Register an app in Microsoft Entra ID
Add API permissions
Sites.Selected.Then click Grant admin consent. At this stage AGO is not yet able to read any site — Sites.Selected only gives the capability to be granted access on a per-site basis. Once a site is granted, it covers the site’s document libraries and file contents.Files.Read.All and Sites.Read.All are not needed in this mode. They let the app read every site and every OneDrive of your tenant, whatever sites you select.Create a client secret
Configure AGO
List the sites and grant access
- In Knowledge > Sources > Connections > SharePoint, under Granted SharePoint sites, add each site URL AGO may read (e.g.
https://contoso.sharepoint.com/sites/Marketing). - Click Grant access with Microsoft and sign in with an account that is a SharePoint Administrator and a member of each listed site.
- The first time, Microsoft asks a Global Administrator to approve the AGO – SharePoint site access app for your organization.
Add restricted folders (optional)
- Under Restricted folders, add the folder address. You can copy it from the browser while the folder is open in SharePoint (e.g.
https://contoso.sharepoint.com/sites/Marketing/Shared Documents/Contracts). The folder must be inside one of the listed sites. - Click Grant access with Microsoft. The account you sign in with must have access to the folder.
Create a knowledge source
- Go to Knowledge > Sources and click Create New Source
- Select
sharepointas the Source Type - Pick a site from the SharePoint Site list (it shows the granted sites)
- Pick a Document Library, then browse the folder tree to choose where the import starts
- Click Save, then open the source and click Sync Source
Grant access manually
For every SharePoint site you want AGO to read, a SharePoint admin runs the following Microsoft Graph call with a token that has theSites.FullControl.All application permission, then adds the site URL under Granted SharePoint sites in AGO.
Before running the commands, gather these values:
- curl
- PowerShell
Grant-PnPAzureADAppSitePermission or the CLI for Microsoft 365.
For a restricted folder, the equivalent call is POST https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items/{item-id}/permissions with the body {"roles": ["read"], "grantedToV2": {"application": {"id": "YOUR_AGO_CLIENT_ID", "displayName": "AGO"}}}. Granting a folder that still follows the site permissions breaks its inheritance, so only do it for folders that already have their own permissions.
Configuration Options
What Gets Imported
- Each folder becomes a parent document
- Each file becomes a child document with its extracted text content
- Each document links to the original item, so users can open it in SharePoint
- Each document keeps the file’s extension, size and path
- The original file can be downloaded through the API, without a SharePoint account: see Download a document’s original file
Troubleshooting
Test Connection returns 401
Test Connection returns 401
- Verify the Tenant ID is the actual tenant GUID, not
common - Check that the Client Secret is the secret value (not the secret ID)
- If the secret is older than its expiration date, generate a new one
- Check that admin consent has been granted for the API permissions
Site dropdown is empty (All sites mode)
Site dropdown is empty (All sites mode)
https://contoso.sharepoint.com/sites/marketing) and click Test access.Site dropdown is empty (Selected sites mode)
Site dropdown is empty (Selected sites mode)
Test access returns 403 (Selected sites mode)
Test access returns 403 (Selected sites mode)
- Verify the application
idin the grant matches your AGO Client ID - Verify the site URL in the grant request is identical to the one you paste in AGO
- Some tenants take a few minutes for new grants to propagate
Grant access with Microsoft fails
Grant access with Microsoft fails
- Microsoft refused the sign-in: a Global Administrator must first approve the AGO – SharePoint site access app for your organization.
- Refused: the account you signed in with must have the SharePoint Administrator role and be a member of each site. Add it as a member of the site, then click the button again.
- Site not found: check the URL. Use the site address (e.g.
https://contoso.sharepoint.com/sites/Marketing), not a link to a document or a page. - Not in a listed site: a restricted folder must be inside one of the sites listed under Granted SharePoint sites. Add its site, then click the button again.
Sync runs but no files are imported
Sync runs but no files are imported
- In All sites mode, confirm the app has
Files.Read.Allgranted in addition toSites.Read.All - Check the configured folder path actually exists in the library
- In Selected sites mode, confirm the site has been granted to AGO (its badge shows Access OK)
- In Selected sites mode, AGO cannot read a folder with limited access until you add it under Restricted folders and grant it
Files appear with placeholder text like [Unsupported file type]
Files appear with placeholder text like [Unsupported file type]
Related
- Knowledge Connectors: all connectors
- Knowledge Source Management: managing sources
