# Connect SharePoint

Give offgen read-only access to a SharePoint document library so it can import your slides, icons and images.

Source: https://www.offgen.ai/docs/sharepoint

Connect a SharePoint document library, and offgen can import the slides, icons and images in it into your [Library](/docs/library) and keep them in sync. Access is read-only and limited to the sites you connect. Which folders are imported, and how, is set with [offgen.json files](/docs/sharepoint/import).

**Where:** [Settings → Integrations → SharePoint](https://app.offgen.ai/settings/sharepoint) at app.offgen.ai · **Who:** admin task. You need the Owner or Admin role in offgen, or a custom role with the Integrations permission. Other members don't see SharePoint in Settings.

## Who you need

| Who                                | What they do                                                 | When                       |
| ---------------------------------- | ------------------------------------------------------------ | -------------------------- |
| offgen Owner or Admin              | Adds the site in offgen                                      | Always                     |
| SharePoint administrator           | Signs in with Microsoft and approves read access to the site | Always                     |
| Microsoft 365 Global Administrator | Grants admin consent for offgen once for your tenant         | Only if offgen asks for it |

## Connect a site

1. Open [Settings → SharePoint](https://app.offgen.ai/settings/sharepoint) and select **Add site**.
2. Paste the **SharePoint site URL**, for example `https://contoso.sharepoint.com/sites/Marketing`. A link to one of its document libraries works too.
3. Select **Connect with Microsoft**. A SharePoint administrator signs in and approves read access to this one site. The sign-in is used only to set up the connection.
4. Back in offgen, **Choose a document library** opens. offgen reads exactly one library per connection. Pick the library that holds your slides and select **Connect library**. **Default** marks the site's default library, **From your link** the library from the URL you pasted.
5. The site now shows **Connected** and the library name. Select **Browse files** and open a folder to confirm that offgen can read it.

To use a second library of the same site, select **Add site** again and pick that library.

## Check the status

| Status               | Meaning                                                          | What to do               |
| -------------------- | ---------------------------------------------------------------- | ------------------------ |
| **Connected**        | offgen can read the library.                                     | Nothing.                 |
| **Action needed**    | offgen can't read the site. The message under the site says why. | See the causes below.    |
| **Not verified yet** | Nobody has checked this connection yet.                          | Select **Browse files**. |

Causes of **Action needed**:

* **Admin consent is missing.** Your tenant hasn't granted offgen the [`Sites.Selected`](https://learn.microsoft.com/graph/permissions-selected-overview) application permission. Select **Grant admin consent** in the message under the site and have a Microsoft 365 Global Administrator approve it. After a few minutes, select **Browse files** again.
* **offgen has no access to this site.** offgen can sign in to your tenant, but this site wasn't granted. Connect the site again, or [grant access manually](#grant-access-manually).
* **Microsoft can't be reached.** This is usually temporary. Select **Browse files** to try again.

Admin consent only enables `Sites.Selected`. On its own, it gives offgen access to no site at all.

## Grant access manually

If your organization can't use **Connect with Microsoft**, open **Grant access manually** in the **Add site** dialog. It walks an administrator through three steps:

1. **Add offgen to your tenant:** a Global Administrator selects **Grant admin consent** once.
2. **Grant read access to the site** with [Microsoft Graph Explorer](https://developer.microsoft.com/graph/graph-explorer), Azure CLI or PnP PowerShell. The dialog fills in the request URL, the request body and the commands from the site URL you entered.
3. **Verify:** select **I’ve already granted access**, then choose the document library.

Graph Explorer is the simplest option if you don't normally use Azure CLI or PowerShell.

## Automated imports

The imports set up for your organization appear under **Automated imports**, below the connected sites. Each one has **Check setup**, **Run now** and **History**. offgen sets up an import for you. If you see **No automated imports yet**, [contact support](mailto:support@offgen.ai?subject=SharePoint%20import). To choose which folders are imported, see [SharePoint import settings](/docs/sharepoint/import).

## Disconnect a site

Select **Disconnect** next to the site. offgen stops reading it immediately and also tries to remove the Microsoft permission. You can connect the site again at any time.

## Related

* [SharePoint import settings](/docs/sharepoint/import): the offgen.json settings for each folder
* [Template library](/docs/library): where imported slides end up
* [Users, teams and roles](/docs/admin/members): who has the Owner and Admin roles
* [How offgen secures your data](/en/security) on offgen.ai
