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

# Microsoft OneDrive

> Review the validated minimum OAuth scopes and Sites.Selected limitations for every Microsoft OneDrive action.

Review the validated minimum standard delegated scopes for every Microsoft OneDrive action. The mapping covers personal OneDrive files and site or group drives.

<Warning>
  Personal OneDrive and site-backed drives have different permission requirements.

  `Files.Read` and `Files.ReadWrite` cover personal `/me/drive` operations, while site or group drives require the applicable `.All` scope or permissions for selected sites.
</Warning>

## Minimal scopes per action

<Note>
  Each Microsoft OneDrive connection also requests `openid`, `offline_access`, and `User.Read`. These connection scopes apply in addition to the action scopes in the table.
</Note>

<div style={{overflowX: "auto"}}>
  <table style={{width: "100%", tableLayout: "fixed", overflowWrap: "anywhere"}}>
    <colgroup>
      <col style={{width: "28%"}} />

      <col style={{width: "32%"}} />

      <col style={{width: "40%"}} />
    </colgroup>

    <thead>
      <tr>
        <th style={{width: "22%"}}>Action</th>
        <th style={{width: "28%"}}>Description</th>
        <th style={{width: "50%"}}>Minimum scopes</th>
      </tr>
    </thead>

    <tbody>
      <tr>
        <td><strong>Check file access</strong></td>
        <td>Checks whether a file can be accessed.</td>
        <td><code>Files.Read.All</code></td>
      </tr>

      <tr>
        <td><strong>Create folder</strong></td>
        <td>Creates folder.</td>
        <td><code>Files.ReadWrite.All</code></td>
      </tr>

      <tr>
        <td><strong>Download file</strong></td>
        <td>Downloads file.</td>
        <td><code>Files.Read.All</code></td>
      </tr>

      <tr>
        <td><strong>Download OneDrive file</strong></td>
        <td>Downloads a OneDrive file.</td>
        <td><code>Files.Read.All</code></td>
      </tr>

      <tr>
        <td><strong>Get file metadata</strong></td>
        <td>Gets file metadata.</td>
        <td><code>Files.Read.All</code></td>
      </tr>

      <tr>
        <td><strong>Get folder by name</strong></td>
        <td>Gets a folder by name.</td>
        <td><code>Files.Read.All</code></td>
      </tr>

      <tr>
        <td><strong>List available drives</strong></td>
        <td>Lists available drives.</td>
        <td><code>Files.Read.All</code><br /><code>Sites.Read.All</code><br /><code>Group.Read.All</code></td>
      </tr>

      <tr>
        <td><strong>List files in folder</strong></td>
        <td>Lists files in folder.</td>
        <td><code>Files.Read.All</code></td>
      </tr>

      <tr>
        <td><strong>List files in OneDrive folder</strong></td>
        <td>Lists files in a OneDrive folder from a folder URL.</td>
        <td><code>Files.Read.All</code></td>
      </tr>

      <tr>
        <td><strong>List folder changes</strong></td>
        <td>Lists folder changes.</td>
        <td><code>Files.Read.All</code></td>
      </tr>

      <tr>
        <td><strong>Resolve drive</strong></td>
        <td>Resolves drive.</td>
        <td><code>Files.Read.All</code></td>
      </tr>

      <tr>
        <td><strong>Resolve file</strong></td>
        <td>Resolves file.</td>
        <td><code>Files.Read</code></td>
      </tr>

      <tr>
        <td><strong>Resolve folder</strong></td>
        <td>Resolves folder.</td>
        <td><code>Files.Read.All</code></td>
      </tr>

      <tr>
        <td><strong>Search files</strong></td>
        <td>Searches files.</td>
        <td><code>Files.Read.All</code></td>
      </tr>

      <tr>
        <td><strong>Search OneDrive</strong></td>
        <td>Searches OneDrive.</td>
        <td><code>Files.Read.All</code></td>
      </tr>

      <tr>
        <td><strong>Upload file</strong></td>
        <td>Uploads file.</td>
        <td><code>Files.ReadWrite</code></td>
      </tr>
    </tbody>
  </table>
</div>

Some rows use a thinner scope because the action only reaches personal OneDrive:

* **Resolve file** uses `Files.Read` for personal `/me/drive`, including an explicit personal drive ID.
* **Upload file** writes only to personal `/me/drive`, so `Files.ReadWrite` is enough.
* **Create folder** needs `Files.ReadWrite.All` to write to an arbitrary site drive.
* **List available drives** also needs `Group.Read.All` for `/me/memberOf` and `Sites.Read.All` for followed-site discovery.
* Shared-link resolution through `/shares` works with `Files.Read.All`. Site and group drive reads need `Files.Read.All`.

## Actions affected by `Sites.Selected`

The following actions may not work completely with selected site permissions:

<AccordionGroup>
  <Accordion title="List available drives">
    The **List available drives** action discovers personal, group, and followed-site drives. These discovery results are empty with selected-only permissions, and the action reports notices for group and SharePoint discovery.
  </Accordion>

  <Accordion title="Resolve drive">
    The **Resolve drive** action can resolve a known drive ID, but its name search enumerates `/me/drives`. That enumeration is empty with selected-only permissions.
  </Accordion>

  <Accordion title="Resolve folder">
    The **Resolve folder** action starts with personal `/me/drives` and fans out across those drives. It does not resolve site folder IDs with selected-only permissions.
  </Accordion>

  <Accordion title="Resolve file">
    The **Resolve file** action accesses personal OneDrive only. `Sites.Selected` does not apply, and personal `/me/drives` is empty with selected-only permissions.
  </Accordion>

  <Accordion title="Upload file">
    The **Upload file** action writes to personal OneDrive only. `Sites.Selected` does not apply, and personal `/me/drives` is empty with selected-only permissions.
  </Accordion>
</AccordionGroup>

### Native features

Additionally, the following native features may be affected by a Selected grant:

* **Folder Sync**: Synchronizes local and cloud folders across your workspace.
* **Company Knowledge**: Indexes connected drives and documents for AI search and chat context.

When using selected-only permissions, the drive picker cannot list granted site drives because the underlying drive discovery relies on broad listing actions. While Langdock can still read known files from a granted site if you provide explicit drive and item IDs, dynamic browsing and automatic drive selection in the UI will not work.

## Related pages

* [Microsoft Integration Scopes](/en/admin/manage-integrations/microsoft-integration-scopes)
* [Microsoft integrations: permissions and admin approval](/en/admin/manage-integrations/integration-setup-guides/microsoft)
