# SharePoint Document Library Browser Example Configuration

## Required Connection binding

| Connection slot | Example selection |
| --- | --- |
| `sharePointConnection` | Microsoft Graph / SharePoint OAuth HTTP Connection managed by Yeeflow |

The selected Connection must be authorized to read the configured SharePoint site and document library. Never paste an access token into a string parameter.

## Example 1: Show the document-library root

| Parameter | Example value |
| --- | --- |
| `siteUrl` | `https://contoso.sharepoint.com/sites/Sales` |
| `libraryNameOrId` | `Documents` |
| `folderPath` | Empty |
| `title` | `Sales Documents` |

Expected result: the control lists all direct folders and files in the Documents library root. Users can expand folders to load deeper levels.

## Example 2: Start inside one folder

| Parameter | Example value |
| --- | --- |
| `siteUrl` | `https://contoso.sharepoint.com/sites/Sales` |
| `libraryNameOrId` | `Documents` |
| `folderPath` | `Sales Quotations` |
| `title` | `Sales Quotations` |

Expected result: the first screen contains only the direct children of the `Sales Quotations` folder. It does not show sibling folders from the library root.

## Example 3: Start inside a nested project folder

| Parameter | Example value |
| --- | --- |
| `siteUrl` | `https://contoso.sharepoint.com/sites/Projects` |
| `libraryNameOrId` | `Shared Documents` |
| `folderPath` | `Active Projects/PRJ-1042/Deliverables` |
| `title` | `Project Deliverables` |

Expected result: the browser starts at the Deliverables folder. Subfolders below Deliverables remain expandable.

## Example 4: Resolve the library by drive ID

| Parameter | Example value |
| --- | --- |
| `siteUrl` | `https://contoso.sharepoint.com/sites/Operations` |
| `libraryNameOrId` | `b!exampleDriveIdentifier` |
| `folderPath` | `Policies/Approved` |
| `title` | `Approved Policies` |

Use a real Microsoft Graph drive ID from the target tenant. A drive ID is useful when the library display name may change.

## Dynamic folder-path example

`folderPath` is a Variable parameter and may be bound to a trusted Yeeflow expression, for example a controlled project-folder value. The expression must resolve to a plain relative path such as:

```text
Projects/PRJ-1042
```

Do not return a site URL, sharing URL, JSON object, or array. Restrict dynamic values so users cannot redirect the shared Connection to unintended locations.

## Path rules

- Leave the value empty to show the library root.
- Use a path relative to the library root.
- Both `/` and `\` separators are normalized.
- Leading, trailing, and repeated separators are ignored.
- `.` and `..` path segments are rejected.
- Each path segment is URL-encoded by the control.

## Validation checklist

- Confirm the site resolves with the selected Connection.
- Confirm the library name or drive ID resolves.
- Test an empty root path and at least one nested folder path.
- Expand a non-empty and an empty child folder.
- Test a location large enough to exercise Microsoft Graph pagination.
- Confirm Open links point to the intended SharePoint tenant and item.
- Select Refresh and confirm the same configured location reloads.
- Test the responsive layout below 760 px.

