---
title: "Read a SharePoint connection's site policy"
method: GET
path: "/v1/integrations/accounts/{account_id}/scope"
tags: ["integrations"]
---

# Read a SharePoint connection's site policy

`GET /v1/integrations/accounts/{account_id}/scope`

## Request

- Base URL: `https://api.patricia.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.patricia.app/v1/integrations/accounts/{account_id}/scope`
- Auth: HTTP bearer

Which SharePoint sites Patricia may address through this connection. Gated by the same rule as the write: a PERSONAL connection answers to the person who connected it and to nobody else, with no admin bypass; a TEAM connection answers to account-edit authority. Anything this caller may not be told about answers 404 rather than 403 — an unknown id, a connection that carries no policy, and another member's personal connection are deliberately indistinguishable.

**Read the TEAM half as an editing gate, not as confidentiality.** The selected site ids of a team connection already reach every member who can see that connection, through the agent's own connection listing, which names them so the model does not have to discover the boundary one refusal at a time. Aligning the two is an open decision, recorded in the PR that added this endpoint; what is NOT true today is that this gate keeps a member from learning which sites a team connection reaches.

## Path parameters

- `account_id` string, uuid, required

## Headers

- `X-Tenant-Id` string, nullable

## Response `200`

Successful Response

- SharePointScopeResponse: One connection's policy, and the version the next write has to send back. ``policy_version`` is ``None`` when no policy row exists, which is the expect-absent case rather than version zero — an editor has to be able to say "I read no policy" and have that be checkable against the row that does or does not appear. ``owner_authored`` is what makes a row a grant. A row written by the connection-landing insert carries ``false`` here: it records that the connection exists, never that anybody chose its policy, and the authorizer reads that rather than ``mode_code``.
  - `mode_code` 'unrestricted' | 'selected_sites', required: Which SharePoint sites a connection may address through Patricia. - ``UNRESTRICTED``: anything the Microsoft identity and the reviewed tool surface permit. This is what every connection does today, and what a migration-backfilled row records. - ``SELECTED_SITES``: only the canonical site ids named in the policy, and the drive ids materialized under them. The mode alone never decides access. A row's ``owner_authored_at`` says whether a HUMAN chose the policy or a landing insert merely recorded that the connection exists, and only the former is a grant.
  - `policy_version` integer, nullable, required
  - `owner_authored` boolean, required
  - `sites` string[], required
  - `drives` ScopeDrivePair[], required
    - `drive` string, required
    - `site` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/patricia/apis/patricia-api.md) · [All operations](https://skmtc.dev/patricia/apis/patricia-api/llms.txt) · [OpenAPI document](https://skmtc.dev/patricia/apis/patricia-api/revisions/0dfb44495ea1?raw)
