> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/technical-reference/files-knowledge-and-retrieval/source-permissions-and-retrieval-access.md).

# Source Permissions and Retrieval Access

Source permissions can restrict which provider files a user may retrieve. Knowledge-base access and provider-file access are separate checks.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FZcUb0zdehTM52XHfIXxk%2FG041.mp4?alt=media&token=f2bb4dd7-7a01-4c3b-9a01-6e735ac03ba9>" %}

## Before you begin

A supported source-permission configuration and a user identity that can be mapped for the provider.

## Key concepts

| Term               | Definition                                                                                                                                            |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Source permissions | Access rules for the original documents or records. Knowledge-base sharing does not necessarily grant access to every source.                         |
| Authorization      | The decision whether a caller can perform an operation on a resource. Check roles, scopes, organization context, and sharing when access is denied.   |
| User identity      | The authenticated person or application acting on a resource. It determines access; a display name or conversation ID does not authenticate a caller. |
| Connection         | A saved authorization to a particular provider account. An action uses the selected account’s access, subject to StackAI sharing controls.            |

## Check access to source content

1. Review access to the knowledge base itself.
2. Enable and configure supported source-permission filtering for the retrieval path.

![Enable Enforce source permissions for a supported connected knowledge base.](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/CUmjjWDp3kgB1AnexE5e/assets/g041-g041-01-enabled.png)

Enable Enforce source permissions for a supported connected knowledge base.

3. Inspect retrieval using the intended user’s access level and confirm the returned sources.

The configured retrieval path applies the relevant knowledge-base and source access checks.

## Behavior and limitations

Granting access to a knowledge base does not always grant access to every source file. Conversely, a provider credential used for background synchronization is not proof of the end user’s access. Permission behavior depends on the provider, selected node, and identity configuration. Do not treat an owner’s successful query as evidence for all viewers.

## Related resources

[Source permissions](https://docs.stackai.com/guides-and-quickstarts/knowledge-and-retrieval/source-permissions.md)

[File Inputs, Supported Formats, and Size Limits](https://docs.stackai.com/technical-reference/files-knowledge-and-retrieval/file-inputs-supported-formats-and-size-limits.md)


---

# 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://docs.stackai.com/technical-reference/files-knowledge-and-retrieval/source-permissions-and-retrieval-access.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.
