> For the complete documentation index, see [llms.txt](https://help.nightfall.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.nightfall.ai/nightfall_integrations/saas-app-permissions-reference.md).

# SaaS App Permissions Reference

Every permission, scope, and admin role each Nightfall SaaS integration requests, what access it grants, and why Nightfall needs it.

**Audience:** Security reviewers and SaaS app owners who approve Nightfall integrations.

**Applies to:** Slack, Google Drive, Gmail, Microsoft 365 (Teams, OneDrive, SharePoint, Exchange Online), GitHub, Jira, Confluence, Salesforce, Zendesk, Notion, Claude Enterprise, and Directory Sync (Microsoft Entra ID, Google Workspace, Okta).

This page lists what each integration asks for when you connect it, who in your organization has to approve it, and the reason behind every permission. Permissions are grouped by what they let Nightfall do:

* **Read** permissions let Nightfall find sensitive data and attribute it to the right person.
* **Write** permissions let Nightfall take the remediation actions you configure in a policy (for example, redacting a message or removing a public link). Nightfall only takes these actions when a policy you configured calls for them, or when an analyst triggers them from the Nightfall console.

For how each integration authenticates and how to keep it connected, see [SaaS Apps - Authorization, Authentication & Best Practices](https://help.nightfall.ai/nightfall_integrations/saas-apps-authorization-authentication-and-best-practices.md).

***

## Summary

| Integration                                | How it connects                                              | Who must approve                             | Can Nightfall change content?                                    |
| ------------------------------------------ | ------------------------------------------------------------ | -------------------------------------------- | ---------------------------------------------------------------- |
| Slack (Pro, Business+)                     | Slack app, OAuth                                             | Workspace Owner or Admin                     | Yes: delete messages and files                                   |
| Slack (Enterprise Grid, Enterprise Select) | Slack app with Discovery API, OAuth                          | Org Owner (Grid) or Workspace Owner (Select) | Yes: delete, redact, quarantine                                  |
| Google Drive                               | Service account with domain-wide delegation                  | Super Admin                                  | Yes: sharing changes, labels, file delete                        |
| Gmail                                      | Mail routing rules (no API access)                           | Workspace admin who manages Gmail settings   | Mail actions only: block, quarantine, encrypt, remove attachment |
| Microsoft Teams                            | Temporary admin consent, then an Entra ID app in your tenant | Global Admin or Privileged Role Admin        | No (read only)                                                   |
| OneDrive, SharePoint                       | Temporary admin consent, then Entra ID apps in your tenant   | Global Admin or Privileged Role Admin        | Yes: sharing changes, file delete                                |
| Exchange Online                            | Connectors and mail flow rules (no API access)               | Exchange admin                               | Mail actions only                                                |
| GitHub                                     | GitHub App                                                   | Organization owner                           | Comments only (on pull requests and commits)                     |
| Jira                                       | Atlassian Marketplace app plus OAuth                         | Jira admin                                   | Yes: redact, delete attachments                                  |
| Confluence                                 | Atlassian Marketplace app                                    | Confluence admin                             | Yes: redact, delete attachments                                  |
| Salesforce                                 | Managed package plus OAuth (PKCE)                            | Salesforce admin                             | Yes: redact, replace files, freeze users                         |
| Zendesk                                    | Marketplace app plus OAuth                                   | Zendesk admin                                | Yes: redact, make comments private                               |
| Notion                                     | Notion Marketplace app, OAuth                                | Notion workspace admin (Enterprise plan)     | Yes: redact, delete files, sharing changes                       |
| Claude Enterprise                          | Compliance API key (read only)                               | Claude organization admin                    | No (read only)                                                   |
| Directory Sync: Microsoft Entra ID         | Nightfall IDP app, admin consent                             | Global Admin or Privileged Role Admin        | No (read only)                                                   |
| Directory Sync: Google Workspace           | Service account with domain-wide delegation                  | Super Admin                                  | No (read only)                                                   |
| Directory Sync: Okta                       | Okta API service integration                                 | Okta Super Admin                             | No (read only)                                                   |

***

## Slack

Nightfall offers two Slack apps. Which one you install depends on your Slack plan.

### Nightfall DLP for Slack (Pro and Business+)

**Who must install:** A Workspace Owner, Workspace Admin, or Primary Owner. Nightfall checks the installer's role and rejects the install for any other user. Use a dedicated service account, because the installer's user token is used to delete messages and files.

**How it connects:** One OAuth consent screen. Slack issues a bot token for scanning and a user token from the installing admin, used to delete messages and files. Nightfall receives new messages and files through the Slack Events API. Every bot scope below is required; Slack installs that grant fewer scopes are rejected.

**Bot token scopes**

| Scope              | Access | Why Nightfall needs it                                                                      |
| ------------------ | ------ | ------------------------------------------------------------------------------------------- |
| `channels:history` | Read   | Receive and re-read messages in public channels the app is in, for scanning and remediation |
| `groups:history`   | Read   | Same, for private channels the app is in                                                    |
| `im:history`       | Read   | Same, for direct messages the app is part of                                                |
| `mpim:history`     | Read   | Same, for group direct messages the app is part of                                          |
| `channels:read`    | Read   | List public channels and read channel details and members                                   |
| `groups:read`      | Read   | Read private channel details and members                                                    |
| `im:read`          | Read   | Read direct message conversation details                                                    |
| `mpim:read`        | Read   | Read group direct message conversation details                                              |
| `files:read`       | Read   | Receive file-shared events and download files for scanning                                  |
| `users:read`       | Read   | Look up users and bots to attribute findings                                                |
| `users:read.email` | Read   | Add the author's email to findings and alerts                                               |
| `usergroups:read`  | Read   | Read user groups so policies can include or exclude them                                    |
| `team:read`        | Read   | Read the workspace name and domain to build message links                                   |
| `channels:join`    | Write  | Join public channels automatically, only if you turn on auto-join                           |
| `chat:write`       | Write  | Post alerts, notices to users, and the welcome message                                      |
| `im:write`         | Write  | Open direct messages to notify users about a violation                                      |
| `groups:write`     | Write  | Create the private `#nightfall-alerts-slack` channel at install and invite the installer    |
| `commands`         | Write  | Provide the Nightfall help slash command                                                    |
| `files:write`      | Write  | Requested by the app today. Not used by a current Pro feature                               |

**User token scopes (installing admin)**

| Scope                                        | Access | Why Nightfall needs it                                                               |
| -------------------------------------------- | ------ | ------------------------------------------------------------------------------------ |
| `chat:write`                                 | Write  | Delete messages that violate a policy, and redact messages found by historical scans |
| `files:write`                                | Write  | Delete files that violate a policy                                                   |
| `channels:write`                             | Write  | Add the Nightfall bot to public channels (older installations only)                  |
| `channels:read`, `groups:read`, `users:read` | Read   | Requested by the app today. Not used by a current feature                            |

### Nightfall Enterprise DLP for Slack (Enterprise Grid and Enterprise Select)

**Who must install:** On Enterprise Grid, an Org Owner who is a member of at least one workspace (the Org Primary Owner is not required). On Enterprise Select, a Workspace Owner. Use a dedicated service account, because the installer's user token carries the Discovery API access. Slack must enable the Discovery API for your organization before you install (contact Slack to request it). On Enterprise Grid, install at the organization level so the app covers every workspace.

**How it connects:** Two OAuth steps. Step 1 grants Discovery API access with the Org Owner's user token. Step 2 installs the bot. Nightfall reads content org-wide through the Discovery API, so the bot does not need to be added to channels.

**Step 1: user token scopes (Org Owner)**

| Scope             | Access | Why Nightfall needs it                                                                                                        |
| ----------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------- |
| `discovery:read`  | Read   | Read messages, files, channels, and users across all workspaces, including private channels and direct messages, for scanning |
| `discovery:write` | Write  | Delete, redact, quarantine, and restore messages and files                                                                    |
| `groups:write`    | Write  | Requested by the app today. Not used by a current feature                                                                     |

**Step 2: bot token scopes**

| Scope                                                  | Access | Why Nightfall needs it                                                                                      |
| ------------------------------------------------------ | ------ | ----------------------------------------------------------------------------------------------------------- |
| `channels:read`, `groups:read`, `im:read`, `mpim:read` | Read   | Read channel and conversation details                                                                       |
| `files:read`                                           | Read   | Read details of quarantined file copies                                                                     |
| `users:read`                                           | Read   | Look up users and bots to attribute findings                                                                |
| `users:read.email`                                     | Read   | Add the author's email to findings and alerts                                                               |
| `usergroups:read`                                      | Read   | Read user groups for policy scoping                                                                         |
| `chat:write`                                           | Write  | Post alerts, quarantine notices, and replies to business justification requests                             |
| `im:write`                                             | Write  | Notify users about a violation by direct message                                                            |
| `files:write`                                          | Write  | Move quarantined files into the private quarantine content channel                                          |
| `groups:write`                                         | Write  | Create three private channels at install (alerts, quarantine, quarantined content) and invite the installer |
| `commands`                                             | Write  | Provide the Nightfall help slash command                                                                    |
| `channels:join`                                        | Write  | Requested by the app today. Not used by a current Enterprise feature                                        |

### What Nightfall can change in Slack

| Action                                                                 | Plan                                    |
| ---------------------------------------------------------------------- | --------------------------------------- |
| Delete a message or file, and tell the author why                      | Pro, Business+, Enterprise              |
| Redact sensitive text in a message                                     | Enterprise (Pro: historical scans only) |
| Quarantine a message or file pending review, then restore or delete it | Enterprise                              |
| Send a direct message to the author                                    | All                                     |
| Create private Nightfall channels at install                           | All                                     |

### Slack settings needed at install

* **Private channel creation (temporary).** Nightfall creates its private alert channels during install. If your workspace limits who can create private channels, set **People who can create private channels** to **Everyone, plus Multi-Channel Guests (default)** for the install. Otherwise the install fails with a `restricted_action` error. You can change the setting back after install.
* **Message retention (Enterprise, optional).** To scan edits to direct messages, set Slack's retention policy to **Keep all messages, including revision history**.

**Data handling:** Nightfall does not store raw Slack message text. It stores a masked copy of the violating message and the finding snippets with the violation record for 90 days. Tokens are encrypted at rest.

***

## Google Drive

**Who must approve:** A Google Workspace Super Admin. Google only lets Super Admins manage domain-wide delegation.

**How it connects:**

1. In the Google Admin Console (**Security > Access and data control > API controls > Domain-wide delegation**), you authorize Nightfall's service account Client ID with the scopes below. The Nightfall console shows the Client ID during setup.
2. A Workspace admin signs in to Nightfall once. Nightfall records that admin's email and uses it for admin-level calls (directory, audit logs, labels, shared drive administration).
3. For file operations, Nightfall acts as the file's owner (or another user with access) through domain-wide delegation.

Nightfall detects changes by polling the Drive changes feed, typically every 5 to 15 minutes. It does not use push notifications.

**Domain-wide delegation scopes**

| Scope                                                                   | Access         | Why Nightfall needs it                                                                                                                                              |
| ----------------------------------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `https://www.googleapis.com/auth/drive`                                 | Read and write | **Read:** list files, read sharing settings, download file content for scanning, track changes, list shared drives. **Write:** the remediation actions listed below |
| `https://www.googleapis.com/auth/admin.directory.user.readonly`         | Read           | List users so Nightfall can scan each user's files and tell internal from external users                                                                            |
| `https://www.googleapis.com/auth/admin.directory.group.readonly`        | Read           | Read groups for policy scoping and sharing analysis                                                                                                                 |
| `https://www.googleapis.com/auth/admin.directory.group.member.readonly` | Read           | Expand group membership, including nested groups                                                                                                                    |
| `https://www.googleapis.com/auth/admin.directory.domain.readonly`       | Read           | Read your domains and aliases to decide what counts as external sharing. Also confirms the signing-in user is an admin                                              |
| `https://www.googleapis.com/auth/admin.reports.audit.readonly`          | Read           | Read Drive audit events (download, view, copy, print, sharing changes). Needed only for exfiltration and audit event features                                       |
| `https://www.googleapis.com/auth/drive.apps.readonly`                   | Read           | Show the name of the app behind an audit event (for example, which app downloaded a file). Needed only for exfiltration features                                    |
| `https://www.googleapis.com/auth/drive.admin.labels`                    | Read (as used) | List all Drive labels in your organization for label-based policies and the Apply Label action                                                                      |
| `https://www.googleapis.com/auth/admin.directory.user`                  | Write          | Suspend a Google Workspace user account. This is its only use                                                                                                       |

**Admin sign-in scopes:** `userinfo.email` (to record the admin's email) and `userinfo.profile`.

**Drive labels on older installations:** `drive.admin.labels` is part of the current scope list. If your domain-wide delegation entry was created before label support, add this scope to the existing entry. See [Enable Google Drive Labels](https://help.nightfall.ai/google-drive/getting_started/labels.md).

**Directory Sync is separate.** Google Workspace Directory Sync uses a different service account and its own domain-wide delegation entry. See [Directory Sync](#directory-sync).

### What Nightfall can change in Google Drive

| Action                                                                                                 | Scope used             |
| ------------------------------------------------------------------------------------------------------ | ---------------------- |
| Remove public ("anyone with the link") and domain-wide links                                           | `drive`                |
| Remove external or internal users from a file                                                          | `drive`                |
| Change sharing to domain only                                                                          | `drive`                |
| Remove members from a shared drive                                                                     | `drive`                |
| Prevent viewers from downloading, copying, or printing                                                 | `drive`                |
| Apply Drive labels                                                                                     | `drive`                |
| Delete a file from historical scan results, either by moving it to trash or by deleting it permanently | `drive`                |
| Suspend a user account                                                                                 | `admin.directory.user` |

Notifications to file owners are sent by Nightfall and do not use a Google scope.

***

## Gmail

**Nightfall requests no Gmail API access and no OAuth scopes.** Gmail DLP works through mail routing that your admin configures in Google Workspace. Nightfall never stores a Google credential for Gmail.

**Who must configure it:** A Google Workspace admin with rights to manage Gmail routing and compliance settings.

**What you configure in the Google Admin Console:**

1. **SMTP relay:** allow Nightfall's relay IP addresses (shown in the Nightfall console during setup) so Nightfall can deliver scanned mail back through Google.
2. **Host route:** add a route to Nightfall's inbound mail host, with TLS and a CA-signed certificate required.
3. **Content compliance rule:** send outbound mail from your domain to Nightfall and add a header that identifies your Nightfall tenant.
4. **Quarantine rule (optional):** hold messages that Nightfall marks for quarantine.

**Scope of scanning:** outbound mail that matches your compliance rule.

**What Nightfall can do:** block a message, quarantine it (through your quarantine rule), remove an attachment, encrypt the message, or add a footer.

***

## Microsoft 365 (Teams, OneDrive, SharePoint)

**Who must approve:** A Global Administrator or Privileged Role Administrator. Only these Microsoft roles can grant Microsoft Graph application permissions, so setup stops with an "insufficient privileges" error for any other role.

**How it connects:** Microsoft 365 uses two separate kinds of access.

1. **A temporary setup permission.** An admin signs in and approves Nightfall's setup app. Nightfall uses this delegated access only while that admin is signed in, to create and maintain Nightfall's app registrations in your tenant. It is not used for scanning.
2. **Ongoing app registrations.** Nightfall creates one single-tenant app registration in your Entra ID tenant for each product you turn on: **Nightfall Teams DLP**, **Nightfall Onedrive DLP**, **Nightfall Sharepoint DLP**, and (if you turn on exfiltration monitoring) **Nightfall Exfiltration**. Each one has its own client secret and the Microsoft Graph application permissions listed further down. All scanning runs through these apps (app-only access). No user identity is involved.

### Temporary setup permission

When an admin clicks **Connect** in the Nightfall console, Microsoft asks them to sign in and approve Nightfall's setup app. Nightfall asks Microsoft to show the consent screen on every sign-in, so the admin sees exactly what is being approved each time. The consent screen lists these delegated permissions:

| What the consent screen shows                                                                          | Why Nightfall needs it                                                                         |
| ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |
| Permission to read the organization's details                                                          | Read your tenant name and default domain to register the tenant in Nightfall                   |
| Permission to manage the Azure app permissions and grants for individual services like Microsoft Teams | Grant each Nightfall app registration the Microsoft Graph application permissions listed below |
| Permission to read and update Azure applications for individual services like Microsoft Teams          | Create, update, and delete Nightfall's app registrations, and add client secrets to them       |
| Permission to read and update the user profile                                                         | Sign the admin in. Nightfall does not read or change any other profile data                    |

Delegated permissions act with the signed-in admin's own rights, so Nightfall can never do more during setup than that admin can do.

**How long this access lasts**

* After the admin approves, Microsoft issues Nightfall a short-lived access token. Microsoft sets its lifetime (typically 60 to 90 minutes).
* Nightfall keeps that token only in a temporary cache that deletes it when it expires. It is not saved with your integration settings.
* Nightfall does not request offline access, so Microsoft issues no refresh token. Nightfall cannot extend or renew this access on its own. Once the token expires, Nightfall has no delegated access to your tenant.
* Nightfall cannot add permissions to its own app registrations. Any change to their permissions needs an admin to sign in again.

**Actions that need an admin to sign in again**

Each of these actions starts a new sign-in and consent. Any Global Administrator or Privileged Role Administrator can do it. It does not have to be the admin who first set up the tenant.

| Action in the Nightfall console | What Nightfall does with the temporary access                                                                                                                                                                                         |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Add a tenant and select apps    | Creates an app registration for each selected product, assigns its permissions, and creates its client secret                                                                                                                         |
| Update app selection            | Creates app registrations for products you turn on, deletes the app registrations for products you turn off, and re-applies the current permissions to the apps you keep. You must remove a product's policies before you turn it off |
| Renew a client secret           | Adds a new client secret to the product's app registration                                                                                                                                                                            |
| Delete the tenant               | Deletes Nightfall's app registrations and removes Nightfall's setup app from your tenant                                                                                                                                              |

**Client secrets:** Nightfall creates each client secret with Microsoft's default lifetime (currently two years). The Nightfall console shows the expiry date. Renew the secret before it expires. If it lapses, scanning for that product stops until an admin renews it.

**Directory Sync is separate.** Microsoft 365 scanning works with Directory Sync, which uses its own Entra ID app (**Nightfall IDP**) and its own admin consent. See [Directory Sync](#directory-sync).

### Ongoing app permissions

All permissions below are **Application** permissions, which apply across your tenant. Turning off a product in Nightfall deletes its app registration.

### Permissions every Nightfall Microsoft 365 app receives

| Permission              | Access         | Why Nightfall needs it                                                                                                                           |
| ----------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Files.ReadWrite.All`   | Read and write | Read file content and sharing settings for scanning. Write is used for OneDrive and SharePoint remediation. The Teams app only reads attachments |
| `Team.ReadBasic.All`    | Read           | Read team details and look up Teams channels used as alert destinations                                                                          |
| `Channel.ReadBasic.All` | Read           | List channels and read channel details                                                                                                           |

### Microsoft Teams (Nightfall Teams DLP)

| Permission                | Access | Why Nightfall needs it                                                   |
| ------------------------- | ------ | ------------------------------------------------------------------------ |
| `ChannelMessage.Read.All` | Read   | Read channel messages and replies, and subscribe to new channel messages |
| `Chat.Read.All`           | Read   | Read one-on-one and group chat messages                                  |
| `User.Read.All`           | Read   | Look up the sender's name and email to attribute findings                |
| `Group.Read.All`          | Read   | Find which Microsoft 365 groups are Teams                                |

**Teams is read only.** Nightfall does not delete or hide Teams messages. Tenant-wide channel message subscriptions require a qualifying Microsoft license (for example, Microsoft 365 E5). Without one, Nightfall subscribes channel by channel.

### OneDrive (Nightfall Onedrive DLP)

| Permission                             | Access | Why Nightfall needs it                                |
| -------------------------------------- | ------ | ----------------------------------------------------- |
| `InformationProtectionPolicy.Read.All` | Read   | Read your sensitivity labels for label-aware policies |

Plus the three shared permissions above.

### SharePoint (Nightfall Sharepoint DLP)

| Permission       | Access | Why Nightfall needs it                     |
| ---------------- | ------ | ------------------------------------------ |
| `Sites.Read.All` | Read   | Discover sites and list document libraries |

Plus the three shared permissions above.

### Exfiltration monitoring (Nightfall Exfiltration)

Created only if you turn on Microsoft 365 exfiltration monitoring.

| Permission                                       | Access | Why Nightfall needs it                                                                                                      |
| ------------------------------------------------ | ------ | --------------------------------------------------------------------------------------------------------------------------- |
| `User.Read.All`                                  | Read   | Look up the user behind an activity event                                                                                   |
| `ActivityFeed.Read` (Office 365 Management APIs) | Read   | Read SharePoint and OneDrive audit activity (for example downloads and sharing) from the Office 365 Management Activity API |
| `User.EnableDisableAccount.All`                  | Write  | Requested by the app today. Not used by a current Microsoft 365 scanning feature                                            |
| `RoleManagement.ReadWrite.Directory`             | Write  | Requested by the app today. Not used by a current Microsoft 365 scanning feature                                            |

Plus the three shared permissions above.

### What Nightfall can change in OneDrive and SharePoint

All actions use `Files.ReadWrite.All`.

| Action                                                                        |
| ----------------------------------------------------------------------------- |
| Delete a file (to the recycle bin)                                            |
| Delete a file permanently                                                     |
| Restrict a file to its owner (remove all other permissions and sharing links) |

Nightfall receives change notifications from Microsoft Graph. Notifications carry only item IDs; Nightfall then fetches the item to scan it.

***

## Exchange Online

**Nightfall requests no Microsoft Graph or Exchange permissions for email.** Exchange Online DLP works through connectors and a mail flow rule that your Exchange admin configures.

**Who must configure it:** An Exchange administrator.

**What you configure:**

1. An outbound connector to Nightfall's mail host (TLS required), used only when the mail flow rule sends mail to it.
2. An inbound connector from Nightfall that keeps internal Exchange headers.
3. A mail flow rule that sends mail from inside your organization to the outbound connector and adds a header that identifies your Nightfall tenant.
4. A PowerShell setting on the inbound connector so returning mail is treated as internal.
5. Your Microsoft 365 mail host, entered in the Nightfall console.

***

## GitHub

**Who must install:** A GitHub organization owner. If someone else starts the install, GitHub sends an approval request to the owners instead.

**How it connects:** Nightfall for GitHub is a GitHub App. You install it from the Nightfall console and choose **All repositories** or **Only select repositories** on GitHub's install screen. Nightfall uses short-lived installation tokens issued by GitHub. No personal access token or user token is used for scanning.

### Permissions

| Permission             | Level          | Why Nightfall needs it                                                                                                                          |
| ---------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Contents               | Read           | Read pushed commits, changed files, and file content for scanning. Clone repositories for historical scans. Post commit comments about findings |
| Metadata               | Read           | Required by GitHub for every app. List the repositories the app can access                                                                      |
| Pull requests          | Read and write | Find the open pull request for a commit, and post or update review comments about findings                                                      |
| Issues                 | Read and write | Post a comment on the pull request conversation when a review comment cannot be placed. Nightfall does not read or scan issues                  |
| Members (organization) | Read           | Count organization members for license usage reporting                                                                                          |
| Commit statuses        | Read           | Requested by the app today. Not used by a current feature                                                                                       |

**Webhook events:** `push` (starts a scan) and `repository` (tracks public and private changes). GitHub also sends installation events to every app.

### Organization and repository scoping

* Nightfall can only see repositories in the organization where the app is installed, and only the repositories you selected during install. You control this list in GitHub (**Organization settings > GitHub Apps > Nightfall for GitHub > Configure**).
* If you chose **All repositories**, new repositories are covered automatically. If you chose **Only select repositories**, add new repositories to the list to cover them.
* Each GitHub organization connects to one Nightfall tenant.
* Inside Nightfall, policies can cover all repositories, only public repositories, or only private repositories. You can exclude repositories by name or pattern, file extensions, file paths, bot authors, and specific authors.

### Personal accounts

* Nightfall does not monitor developers' personal GitHub accounts or personal repositories. It only sees repositories in installations connected to your Nightfall tenant.
* GitHub allows apps to be installed on personal accounts, and only that account's owner can do so. A personal install connects to your tenant only if it is started from your Nightfall console.
* Findings are attributed to the GitHub login and commit email of the author. Commit emails are whatever the developer configured in Git, so they can be personal addresses.

### Public, private, and internal repositories

* Nightfall scans public and private repositories the same way. GitHub reports internal repositories on GitHub Enterprise Cloud as private, so they fall under private-repository policies.
* **GitHub comment notifications include a snippet of the finding for context. On public repositories these comments are public.** For public repositories, use email or Slack notifications instead.

### What Nightfall scans

| Content                                                             | Scanned                                                                              |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| Code pushed to any branch (commit diffs and changed files)          | Yes, in real time                                                                    |
| Full repository history                                             | Yes, with historical scans (filter by repository, branch, file type, path, and date) |
| Issues, pull request descriptions, comments, wikis, gists, releases | No                                                                                   |

### Policy use cases

* Catch secrets and API keys committed to any branch.
* Catch customer data (PII, PCI, PHI) checked into code or config files.
* Apply stricter policies to public repositories.
* Audit existing history before you open-source a repository.

### What Nightfall can change in GitHub

Nightfall only posts comments. It does not block pushes, revert commits, change branch protection, or set commit statuses.

**Supported platforms:** GitHub.com (GitHub Free, GitHub Team, and GitHub Enterprise Cloud). GitHub Enterprise Server (self-hosted) is not supported. GitHub Enterprise Cloud with data residency (a hostname on ghe.com) is not supported.

***

## Jira

**Who must install:** A Jira admin. During OAuth, Nightfall checks that the authorizing user has the Jira **Administer** global permission and only connects sites where they do.

**Which account to use:** A standard Atlassian user account used as a service account (it has a password, its own email such as `nightfall-jira@company.com`, and can sign in through the browser). Atlassian's programmatic service accounts are not supported. They cannot complete the OAuth consent screen and cannot hold the redaction scope.

| Function                                            | Credentials used                      |
| --------------------------------------------------- | ------------------------------------- |
| Finding your Jira and Confluence sites during OAuth | The authorizing user                  |
| All scanning, and every other API call              | The Marketplace app's own credentials |
| Atlassian-native redaction                          | The authorizing user                  |

If the authorizing user loses access, scanning continues. Redaction falls back to replacing text with `[Sensitive Data Removed]` until an admin re-authorizes.

**How it connects:** Two steps, in this order:

1. **OAuth authorization** from the Nightfall console (**Select Site**). This connects your Jira site and enables Atlassian-native redaction.
2. **Nightfall DLP for Jira** from the Atlassian Marketplace. This app receives Jira events and performs scanning.

### Marketplace app scopes

| Scope                    | Access                           | Why Nightfall needs it                                                                                                                                   |
| ------------------------ | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ADMIN`                  | Includes read, write, and delete | Atlassian bundles read, write, and delete under this scope. Nightfall does not call Jira administration APIs. See the read, write, and delete uses below |
| (read)                   | Read                             | Read issues, comments, custom fields, and attachments for scanning. Run historical scans by project and date. List projects for policy scoping           |
| (write)                  | Write                            | Redact sensitive text in issue fields and comments when Atlassian Guard redaction is not available. Updates do not send Jira notifications               |
| (delete)                 | Delete                           | Delete attachments that violate a policy                                                                                                                 |
| `ACCESS_EMAIL_ADDRESSES` | Read                             | Add the author's email to findings and alerts                                                                                                            |
| `ACT_AS_USER`            | n/a                              | Requested by the app today. Not used by a current feature                                                                                                |

**Webhook events:** issue created, updated, and deleted; comment created, updated, and deleted; attachment created and deleted.

### OAuth scopes

| Scope                                                                                 | Access         | Why Nightfall needs it                                                                                   |
| ------------------------------------------------------------------------------------- | -------------- | -------------------------------------------------------------------------------------------------------- |
| `redact:issue:jira`                                                                   | Write          | Redact content with Atlassian's native redaction (requires Atlassian Guard Premium)                      |
| `read:permission:jira`                                                                | Read           | Confirm the authorizing user is a Jira admin                                                             |
| `read:application-role:jira`                                                          | Read           | Show your Jira application roles in the Nightfall console                                                |
| `read:confluence-user`                                                                | Read           | Find Confluence sites on the same Atlassian account so you can connect them                              |
| `offline_access`                                                                      | n/a            | Keep the authorization active without signing in again                                                   |
| `read:jira-user`, `read:jira-work`, `write:jira-work`, `read:me`, `read:license:jira` | Read and write | Requested today. Nightfall performs these operations through the Marketplace app, not this authorization |

### What Nightfall can change in Jira

| Action                             | Scope used                                    |
| ---------------------------------- | --------------------------------------------- |
| Redact text in issues and comments | `redact:issue:jira`, or Marketplace app write |
| Delete an attachment               | Marketplace app delete                        |

***

## Confluence

**Who must install:** A Confluence admin.

**How it connects:** Install **Nightfall DLP for Confluence** from the Atlassian Marketplace. The connection belongs to the app, not to the person who installed it. Nightfall finds your Confluence site during the Atlassian OAuth step in the Nightfall console.

### Marketplace app scopes

| Scope                    | Access | Why Nightfall needs it                                                                                                                                                          |
| ------------------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `READ`                   | Read   | Read pages, blog posts, comments, attachments, and spaces for scanning. Read page restrictions to show who can access content with a finding. Search content for policy scoping |
| `WRITE`                  | Write  | Redact sensitive text in pages, blog posts, and comments                                                                                                                        |
| `DELETE`                 | Delete | Delete attachments that violate a policy. Nightfall does not delete pages, blog posts, or comments                                                                              |
| `ACCESS_EMAIL_ADDRESSES` | Read   | Add the author's email to findings, alerts, and user notifications                                                                                                              |
| `ADMIN`                  | n/a    | Requested by the app today. Nightfall does not call Confluence administration APIs                                                                                              |
| `ACT_AS_USER`            | n/a    | Requested by the app today. Not used by a current feature                                                                                                                       |

**Webhook events:** page and blog post created, updated, restored, trashed, and removed; comment created, updated, and removed; attachment created, updated, restored, trashed, and removed.

**Restricted pages:** The app can only read pages it has access to. If a page or space has restrictions, Nightfall cannot scan it unless you give the **Nightfall DLP for Confluence** app **View** access to that page.

**Data handling:** Content fetched for scanning is cached encrypted and deleted when the scan finishes.

***

## Salesforce

**Who must install:** A Salesforce user with the **System Administrator** profile, for both installing the package and authorizing. Use a dedicated integration user. Nightfall acts as the user who authorizes, so that user's Salesforce permissions decide what Nightfall can scan and fix. The user must stay active, with the same profile, for as long as the org is connected to Nightfall.

**Sandboxes:** After you authorize a production org, Nightfall lists its sandboxes as **Unauthorized**. Each sandbox is scanned only after an admin authorizes it separately.

**How it connects:**

1. Install the **Nightfall DLP** managed package (namespace `nfdlp`). Install it before step 2; the connection fails without it.
2. Authorize Nightfall with OAuth 2.0 (authorization code flow with PKCE). Salesforce issues a refresh token tied to the authorizing user.

### OAuth scopes (Nightfall DLP connected app)

| Scope                                                            | Why Nightfall needs it                                                                        |
| ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `id` (Access the identity URL service)                           | Identify the authorizing user after sign-in                                                   |
| `api` (Manage user data via APIs)                                | Read records, files, and reports for scanning; run historical scans; take remediation actions |
| `refresh_token`, `offline_access` (Perform requests at any time) | Keep scanning running without the user signing in again                                       |
| `content` (Access content resources)                             | Requested by the connected app today. Not used by a current feature                           |

### What the managed package adds to your org

* Apex triggers on Account, Attachment, Case, Case Comment, Contact, Content Version, Contract, Email Message, Feed Comment, Feed Item, and Lead. These send new and changed records to Nightfall for real-time scanning.
* Custom objects for settings and logs (`nfdlp__ApexLog__c`, `nfdlp__ObjectTriggersSetting__c`, `nfdlp__WebhookSetting__c`) and a platform event (`nfdlp__Event__e`).
* Named credentials that point to Nightfall's webhook endpoint.

Nightfall can turn the package's triggers off automatically if your org's daily API usage passes a safety threshold, and turns them back on when usage drops.

**Exfiltration monitoring (optional):** Nightfall subscribes to Salesforce file, report, and Bulk API events. This requires Salesforce Real-Time Event Monitoring (Shield or the Event Monitoring add-on).

**Historical scans** cover every object the authorizing user can query, including custom objects, within the date range you choose.

### What Nightfall can change in Salesforce

| Action                    | What happens in Salesforce                                                                                                                          | The authorizing user needs                                           |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| Redact                    | Replaces sensitive values in record fields. For Email Messages (which cannot be edited), Nightfall creates a redacted copy and deletes the original | Edit access to the object (and create and delete for Email Messages) |
| Remove file content       | Replaces the file with a short notice (a new version for Files, replaced content for Attachments)                                                   | Edit access to the file                                              |
| Freeze or unfreeze a user | Freezes the user's login                                                                                                                            | Permission to manage users                                           |
| Restrict downloads        | Changes the user's profile to Minimum Access - Salesforce                                                                                           | Permission to manage users                                           |

Freeze, unfreeze, and restrict downloads are manual actions that an analyst takes from the Nightfall console.

***

## Zendesk

**Who must install:** A Zendesk admin with full admin permissions who can install Zendesk Support apps. Nightfall checks the authorizing user's role and rejects non-admins. Use a dedicated service account, because Nightfall acts as this user and the connection stops working if the user is suspended or deleted. Requires a Zendesk Team, Growth, Professional, Enterprise, or Enterprise Plus license.

**How it connects:** Two independent steps. Both are required.

1. Authorize Nightfall with Zendesk OAuth from the Nightfall console. Nightfall acts as the admin who authorized.
2. Install the Nightfall DLP app from the Zendesk Marketplace. You can optionally add role or group restrictions in Zendesk to limit who can remove the app.

### OAuth scopes

| Scope   | Access | Why Nightfall needs it                                                                                                                                                            |
| ------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `read`  | Read   | Read tickets, comments, attachments, and chat messages for scanning. Read users, groups, and tags for policy scoping                                                              |
| `write` | Write  | Redact comments, attachments, and chat messages; make comments private; add tags or a comment after an action; create and manage the Nightfall webhooks and triggers listed below |

Nightfall requests the global `write` scope because of a known issue with Zendesk's granular write scopes. Nightfall does not write to users, groups, organizations, macros, views, or account settings.

### What Nightfall creates in your Zendesk

| Object                   | Name                                                           |
| ------------------------ | -------------------------------------------------------------- |
| Webhook                  | Nightfall Webhook                                              |
| Webhook                  | Nightfall DLP Event Webhook                                    |
| Trigger category         | Nightfall DLP                                                  |
| Trigger (one per policy) | \[DO NOT MODIFY OR DEACTIVATE] Nightfall Policy ID (policy ID) |

Do not edit, deactivate, or delete these objects. Scanning stops for the affected policy if you do.

### What Nightfall can change in Zendesk

| Action                                              |
| --------------------------------------------------- |
| Redact text and inline images in a comment          |
| Redact an attachment                                |
| Make a public comment private                       |
| Redact chat and messaging content                   |
| Add tags or a comment to the ticket after an action |

***

## Notion

**Who must install:** A Notion workspace admin. Requires the Notion Enterprise plan.

**How it connects:** Install **Nightfall AI** from the Notion Marketplace and authorize it with OAuth. Nightfall can only see the pages the authorizing user grants access to during authorization. Notion sends Nightfall events when pages, comments, and files change. Nightfall does not run historical scans in Notion.

### Capabilities

| Capability                                      | Access | Why Nightfall needs it                                                                                         |
| ----------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------- |
| Read content                                    | Read   | Read pages, databases, blocks, and files for scanning                                                          |
| Read comments                                   | Read   | Scan comment text                                                                                              |
| Read user information including email addresses | Read   | Attribute findings to the creator or editor                                                                    |
| Update content                                  | Write  | Redact text in pages, page properties, database titles, and comments. Delete file blocks that violate a policy |

Nightfall does not insert new content or comments.

### What Nightfall can change in Notion

| Action                                                                |
| --------------------------------------------------------------------- |
| Redact text in blocks, page properties, database titles, and comments |
| Delete a file attachment                                              |
| Turn off a page's public web link                                     |
| Remove guests from a page                                             |

The last two actions use Notion endpoints that are not part of Notion's public API, so they do not appear as separate capabilities on Notion's consent screen.

***

## Claude Enterprise

**Who must set it up:** A Claude organization admin with access to **Organization settings > Data & privacy** in claude.ai. Requires the Claude Enterprise plan. Claude Team is not supported.

**How it connects:** You create a Compliance Access Key in Claude, give it the scopes below, and paste it into the Nightfall console with your organization ID. These are scopes on the key, not an OAuth sign-in. Nightfall polls the Anthropic Compliance API (Anthropic does not offer webhooks). Admin API keys are not accepted.

### Compliance API scopes

| Scope                        | Access          | Why Nightfall needs it                                                                                                    |
| ---------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `read:compliance_activities` | Read            | Read the activity feed to find new and updated chats and uploaded files                                                   |
| `read:compliance_user_data`  | Read            | Read chats, messages, files, and artifacts for scanning. Read the user directory to attribute findings and scope policies |
| `read:compliance_org_data`   | Read (optional) | Show your organization's name in the Nightfall console. Setup succeeds without it                                         |

**Nightfall makes read-only calls only.** It cannot delete or change chats, files, or projects in Claude. Policies alert your team and can notify users by email.

**Data handling:** Nightfall stores the key encrypted. If you disconnect, Nightfall deletes the key; revoke it in Claude as well. If Forensic Events is turned on for your tenant, prompt and response text is kept as part of the forensic record.

***

## Directory Sync

Directory Sync reads users, groups, and group membership from your identity provider so policies can include or exclude them. Microsoft Teams and OneDrive monitoring depend on it. **Every Directory Sync connection is read only.** Nightfall never creates, changes, or deletes users or groups. Nightfall syncs every four hours, and you can start a manual sync once an hour. To disconnect an identity provider, contact Nightfall support.

### Microsoft Entra ID

**Who must approve:** A Global Administrator or Privileged Role Administrator. Nightfall IDP requests Microsoft Graph application permissions, and Microsoft only lets these two roles (or a custom role with the same right) consent to Graph application permissions. Cloud Application Administrator and Application Administrator cannot.

**How it connects:** The admin signs in from **Settings > Directory Sync** and grants tenant-wide consent to Nightfall's multi-tenant **Nightfall IDP** app. After that, Nightfall reads your directory with app-only access. No user identity is involved. This app is separate from the Microsoft 365 app registrations above.

| Permission              | Access | Why Nightfall needs it                                         |
| ----------------------- | ------ | -------------------------------------------------------------- |
| `Organization.Read.All` | Read   | Confirm the tenant during setup                                |
| `User.Read.All`         | Read   | Read users, track changes, and detect deleted users            |
| `Group.Read.All`        | Read   | Read groups, track changes, and expand nested group membership |

### Google Workspace

**Who must approve:** A Super Admin. Google only lets Super Admins manage domain-wide delegation, and Nightfall reads directory audit events as this admin.

**How it connects:** In **Settings > Directory Sync**, Nightfall shows a service account Client ID and the scopes below. You add them under **Security > Access and data control > API controls > Domain-wide delegation** in the Google Admin Console, then sign in as an admin. This is a separate service account and delegation entry from Google Drive.

| Scope                                                               | Access | Why Nightfall needs it                                                       |
| ------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------- |
| `https://www.googleapis.com/auth/admin.directory.user.readonly`     | Read   | List users and their status (active, suspended, archived, deleted)           |
| `https://www.googleapis.com/auth/admin.directory.group.readonly`    | Read   | List groups                                                                  |
| `https://www.googleapis.com/auth/admin.directory.customer.readonly` | Read   | Read your Google Workspace account details to confirm the connection         |
| `https://www.googleapis.com/auth/admin.reports.audit.readonly`      | Read   | Read admin audit events to pick up user and group changes between full syncs |
| `https://www.googleapis.com/auth/cloud-identity.groups.readonly`    | Read   | Expand nested group membership                                               |

**Admin sign-in scopes:** `userinfo.email` and `userinfo.profile`, to record which admin connected the directory.

### Okta

**Who must approve:** An Okta Super Administrator, which is the role Okta requires to add API service integrations.

**How it connects:** In the Okta Admin Console, go to **Applications > API Service Integrations** and add the **Nightfall AI** integration. Okta issues a client ID and client secret, which you paste into the Nightfall console with your Okta domain. Nightfall uses the client credentials flow. No user token is involved.

| Scope              | Access | Why Nightfall needs it                                                   |
| ------------------ | ------ | ------------------------------------------------------------------------ |
| `okta.users.read`  | Read   | List users and their status                                              |
| `okta.groups.read` | Read   | List groups and their members                                            |
| `okta.logs.read`   | Read   | Read the system log to pick up user and group changes between full syncs |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.nightfall.ai/nightfall_integrations/saas-app-permissions-reference.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
