> ## Documentation Index
> Fetch the complete documentation index at: https://help.dsalta.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sanity

> Headless CMS — members & access

<Tabs>
  <Tab title="Overview">
    Connect Sanity with a project API token to sync project members and datasets, and run access reviews. Read-only.

    <Info>
      **Read-only access.** DSALTA only reads data from this integration. It never creates, modifies, or deletes anything in your environment, and every remediation step is performed by your team directly in the third-party product.
    </Info>

    <Info>
      **What you'll see.** The Access page lists the human **members** of every Sanity project the token can see, merged into one roster: each person appears once, with their name, email, the roles they hold and, when they belong to more than one project, the project names beside the role. Robot members and members without an email address are left out. Sanity reports no account status or MFA state, so every member is shown as **Active** with MFA **Unknown**; the creation date is the date Sanity created the user account.
    </Info>

    <Note>
      DSALTA collects this integration's data when you connect it — you can refresh it at any time with **Sync from integrations** on the **Integrations** page. The compliance checks below re-run once a day at 02:00 America/New\_York.
    </Note>

    ## What DSALTA reads

    DSALTA reads the Sanity project member roster — names, emails, roles and account creation dates — which appears on your **Access** page; and each project's **datasets**, which appear on your **Inventory** page with their access mode (public or private). Documents are never read.

    It calls these Sanity endpoints on `api.sanity.io`, all under the dated API version `/v2021-06-07`:

    * `/v2021-06-07/projects`
    * `/v2021-06-07/projects/{id}`
    * `/v2021-06-07/users/{ids}`
    * `/v2021-06-07/projects/{id}/datasets`

    Every request is a read. DSALTA has no code path that creates, modifies, or deletes anything in your Sanity environment.

    ## Troubleshooting

    <AccordionGroup>
      <Accordion title="The connection is rejected">
        The token must be a **project API token** (it starts with `sk`) created under the project's **API → Tokens**. A space's content **Access tokens** are for the Content Lake and cannot list members. A token that sees no project is rejected as well.
      </Accordion>

      <Accordion title="A member is missing from the Access page">
        Members whose Sanity account has no email address, and robot members, are left out. Sanity also notes that a person who signs in with a different method than the one they were invited under arrives as a separate account with no membership — such a duplicate account does not appear until it is given a role.
      </Accordion>
    </AccordionGroup>

    <AccordionGroup>
      <Accordion title="How do I check whether the connection is healthy?">
        Open **Integrations** in the DSALTA sidebar, stay on the **Connected** tab, and click **Manage** on the integration's card. Open the **Status** tab: it shows either **Connected and working properly** or **Connection issues detected**.

        Use the **Status** tab, not **Overview** — Overview always reports **Connected** regardless of the real state.
      </Accordion>

      <Accordion title="A check shows Failed and nothing changed on my side">
        On an integration-powered check, **Failed** normally means DSALTA was blocked rather than that you are non-compliant. Open the test, go to **Source Data**, and read the result code: **403** is a missing permission, **428** is a setting DSALTA still needs, **500** is a failure on DSALTA's side.

        A real compliance gap shows **207** and leaves the test looking **Completed**. See [Understanding Test Results](/guides/compliance/test-results).
      </Accordion>

      <Accordion title="Data looks out of date">
        Compliance checks re-run once a day at 02:00 America/New\_York. To refresh sooner, open **Integrations → Connected** and click **Sync from integrations** at the top right — it refreshes every connected integration at once.
      </Accordion>

      <Accordion title="How do I repair a broken connection?">
        There is no Reconnect, Repair or Refresh Token button. The only repair available is to disconnect and connect again.

        <Warning>
          **Disconnecting is destructive and cannot be undone.** DSALTA removes the access records, inventory, vulnerabilities, code changes, incidents and device records collected from this integration, and deletes the test results tied to the connection. Export anything you still need as audit evidence first — see [Integration errors](/troubleshooting/integration-errors).
        </Warning>
      </Accordion>

      <Accordion title="Configure scope will not let me change anything">
        That is expected. **Configure scope** is read-only — it shows what DSALTA is permitted to read, and has no Save action. To change what DSALTA can see, change the permissions on the credential in the third-party product, then disconnect and connect again.
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="How to connect">
    A Sanity project API token (Viewer permission suffices). Projects are detected automatically. Read-only.

    **Before you begin**

    * A Sanity project, and the **developer**, **admin** or an equivalent custom role in it — Sanity requires one of those to create tokens.

    You will need:

    | Field             | Where to find it                                                                                         | Example           |
    | ----------------- | -------------------------------------------------------------------------------------------------------- | ----------------- |
    | **Project Token** | [sanity.io/manage](https://www.sanity.io/manage) → project → **Settings → API → Tokens → Add new token** | `sk…`, shown once |

    <Steps>
      <Step title="Start in DSALTA">
        Open **Integrations** in the DSALTA sidebar, find **Sanity**, and click **Connect** to open the connect panel.
      </Step>

      <Step title="Create a project API token">
        Open [sanity.io/manage](https://www.sanity.io/manage), select your project, go to **Settings → API → Tokens**, and click **Add new token**. Name it and choose the **Viewer** permission — DSALTA only reads. Copy the token (it starts with `sk`).

        <Warning>
          This is not the **Access tokens** entry you may see under a space's content settings. Those are read-only Content Lake tokens and cannot read account data; DSALTA rejects them.
        </Warning>

        <Info>
          Sanity states the token "is displayed exactly once" and cannot be recovered. If you lose it, delete it and add a new one.
        </Info>
      </Step>

      <Step title="Connect Sanity">
        Return to the connect panel, paste the project token, and click **Connect**. All projects the token can see are synced.
      </Step>
    </Steps>

    <Check>
      DSALTA validates the token when you click **Connect**, by listing the projects it can see. On success the integration moves to the **Connected** tab, and **Manage → Status** reads **Connected and working properly**. Checks begin reporting after the first sync.
    </Check>

    <Warning>
      **If the connection is rejected.** A content access token instead of a project API token, a deleted token, or a token that sees no project.

      The on-screen message is generic — see [Connection error messages](/troubleshooting/connection-error-messages).
    </Warning>
  </Tab>

  <Tab title="Automated checks">
    Each check below re-runs once a day, at 02:00 America/New\_York, while this integration is connected. Click any check for step-by-step remediation guidance.

    | Check                                                                                                                 | Severity | What it verifies                                                                  |
    | --------------------------------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------- |
    | [User access to Critical System should be valid](/integrations/sanity/user-access-to-critical-system-should-be-valid) | Info     | Checks that everyone with Sanity access is an active employee on the People page. |
    | [Offboarded users should not have active access](/integrations/sanity/offboarded-users-should-not-have-active-access) | High     | Checks that offboarded employees no longer have active Sanity access.             |
  </Tab>

  <Tab title="Useful links">
    | Topic       | Link                                                                    |
    | ----------- | ----------------------------------------------------------------------- |
    | Setup       | [HTTP authentication and tokens](https://www.sanity.io/docs/http-auth)  |
    | Remediation | [Roles](https://www.sanity.io/docs/roles)                               |
    | General     | [Sanity](https://www.sanity.io/manage)                                  |
    | DSALTA      | [Connection error messages](/troubleshooting/connection-error-messages) |
  </Tab>
</Tabs>
