Skip to main content
SharePoint shared files

At a glance

Cogno uses your team’s shared documents while doing work in a Project, and saves finished files back to SharePoint. Each Project explicitly selects its sites. Members do not connect their personal Microsoft accounts to read those sites. One Workspace connection can serve multiple sites. Cogno provides one shared multitenant Microsoft application. Your organization does not create an application or issue a client secret. Nango stores the application’s credentials and renews access tokens. Cogno uses that connection to call Microsoft Graph for file operations.
This is organization-shared access. Each person’s SharePoint permissions are not inherited. Only connect an entire site that may be shared with the participants of every Project that selects it. Keep its contents within those Projects.

Before you start

  • Ask your Microsoft Global Administrator or Privileged Role Administrator to sign in during connection setup and approve Cogno’s shared application. This setup verifies their administrator identity; individual members do not sign in for everyday file access.
  • Grant Cogno’s application write access to each approved site separately. The application uses Microsoft Graph’s Sites.Selected application permission. Admin consent alone does not grant site access. Add site does not change Microsoft-side permissions. Follow Microsoft’s selected permissions guide.
  • Prepare the HTTPS site URL, such as https://contoso.sharepoint.com/sites/Shared. Use a site URL, not a file sharing link.

Connect SharePoint in Cogno

1

Approve Cogno's shared application

Open Integrations → SharePoint and select Connect. Sign in to Microsoft with your organization’s Global Administrator or Privileged Role Administrator account, then approve the requested application permissions. Cogno creates the Nango connection on the server. You do not enter application credentials. A Teams connection is not required.
2

Connect the approved site

Enter the SharePoint site URL. Select I confirm this entire site may be shared with participants of the Projects that select it., then select Add site. Cogno checks live access to the site’s document libraries. This read check does not prove the application has write access.Add more approved sites through the same connection.
3

Select the site for a Project

Open the Project’s integration settings and select the connected SharePoint site. A Project with no selected sites has no SharePoint access. Review the Project’s participants before selecting a site.
4

Review agent permissions

Under Agent tools, review Read SharePoint and Write to SharePoint. Reading is allowed by default; saving and updating require approval by default. Changes apply to the next run. Project settings can further restrict access.

Find and read files

Ask Cogno to list a site’s document libraries, browse a folder or find a file by name. Search matches file names, not document contents, and scans at most 20 provider pages. Cogno reports when that scan is incomplete. Shortcuts to other locations are excluded. Cogno reads text and PDF files up to 5 MiB and returns at most 20,000 characters, with truncation indicated. Other formats return file metadata and a link, not extracted contents. Use the returned SharePoint link as the source when answering questions. If the file changes during a read, read it again.

Save and update finished files

Ask Cogno to save a file produced on the current Task or run. Review the destination, file name and content before approving. Saved files inherit their destination’s sharing. File deletion, sharing-permission changes, SharePoint Lists, site pages and background crawling are not included. Disconnecting SharePoint stops access to all its registered sites. Revoking Microsoft’s site permission stops new access to that site. These changes do not erase answers or files already shared.

Common states

Deployment administrator setup

Cogno’s deployment administrator configures this once per deployment, not once per customer Workspace.
  • Register the shared application in Cogno’s Microsoft tenant for accounts in multiple organizational tenants. Add Microsoft Graph’s Sites.Selected application permission.
  • Register the HTTPS Web redirect URI formed from COGNO_API_URL plus /api/v1/sharepoint/callback.
  • Set the application manifest’s groupMembershipClaims to DirectoryRole. Setup checks the signed ID token’s wids claim for Global Administrator or Privileged Role Administrator; missing role claims stop connection setup.
  • Configure SHAREPOINT_CLIENT_ID and SHAREPOINT_CLIENT_SECRET in the server’s secret-backed configuration. Keep the secret out of browsers, Tasks and Project instructions.
  • Configure the self-hosted Nango integration sharepoint-online-oauth2-cc with scope https://graph.microsoft.com/.default, and the server’s Nango URL and secret key. Cogno sends the common credentials to Nango server-side for each verified organization.
  • When rotating the shared client secret, update every existing Nango connection that stores it as well as the server configuration. Updating only the integration configuration does not replace credentials already saved in connections.

Reference URLs