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

# Microsoft OneDrive

> Learn how to integrate AI agents with Microsoft OneDrive using xpander.ai. Create AI agents that can securely interact with Microsoft OneDrive to manage files and documents across workflows.

## About Microsoft OneDrive

**Microsoft OneDrive** is a cloud-based file storage and content management platform built for storing, syncing, sharing, and collaborating on files across devices and Microsoft 365 applications.

Key features include:

* **Cloud file storage and sync**: Centralized storage for files and folders with automatic synchronization across desktop, web, and mobile devices.

* **File and folder management**: Create, upload, organize, move, copy, and delete files and folders with support for large files and rich metadata.

* **Collaboration and sharing**: Enable secure file sharing and real-time collaboration with granular permission controls for internal and external users.

* **Versioning and recovery**: Maintain version history for files, allowing users and systems to restore previous versions and recover deleted content.

* **Security and compliance**: Built-in security features including encryption, access controls, auditing, and compliance with enterprise and regulatory requirements.

## Authentication Options

Below are possible authentication options you can choose:

<Tabs>
  <Tab title="Built-in xpander.ai Auth">
    The simplest way to connect Microsoft OneDrive is by using xpander.ai's built-in authentication:

    1. Go to the **Connectors** section in the sidebar of your xpander.ai dashboard.
    2. Select **Microsoft OneDrive** from the available integrations.
    3. Click **+ Create new connection**.
    4. Enter a **connector name** as desired, e.g., "xpander-onedrive".
    5. Choose **OAuth2** as the authentication method.
    6. Click **Sign in with Microsoft OneDrive**.
    7. Grant xpander.ai permission to access your account.
    8. Save the configuration.

           <img src="https://mintcdn.com/xpanderai-099931d1/P68LGLZO4_ZlQnMM/images/connectors/microsoft-onedrive/img_1.png?fit=max&auto=format&n=P68LGLZO4_ZlQnMM&q=85&s=25917015a94e87217143616066ebeefc" alt="Img 1" width="2222" height="1370" data-path="images/connectors/microsoft-onedrive/img_1.png" />
  </Tab>
</Tabs>

## Integration of Microsoft OneDrive into an AI Agent

Once you’ve configured your Microsoft OneDrive connector with the authentication option described above, you can integrate it into your AI agent with xpander.ai:

1. In your xpander.ai dashboard, navigate to the **Agents** page, then click an agent to open the **Agent Configuration** tab.

2. Select **Tools**, then click **Add Tools**.

3. Select **Connectors**.

4. Choose **Microsoft OneDrive** with the same **connector name** you configured in the previous section (e.g., xpander-onedrive).

5. Select the available Microsoft OneDrive operations that suit your use case.

   To grant your agent file and folder management capabilities, enable the following operations.

   * **List Drive Items**
   * **Create Item in Drive**
   * **Delete Drive Item (Drive + Item ID)**
   * **Update Drive Item Metadata (Drive + Item ID)**

6. Click **Deploy** to update your agent.

<img src="https://mintcdn.com/xpanderai-099931d1/P68LGLZO4_ZlQnMM/images/connectors/microsoft-onedrive/img_2.png?fit=max&auto=format&n=P68LGLZO4_ZlQnMM&q=85&s=10330d16410db7bb395569ed49222656" alt="Img 2" width="2878" height="1550" data-path="images/connectors/microsoft-onedrive/img_2.png" />

## AI Agent Microsoft OneDrive Prompt Library

Below are possible prompts or use cases you can try after integrating Microsoft OneDrive into your xpander.ai AI agent:

```
List all folders in my one drive.
```

```
Change <folder_name> folder name to <new_folder_name>.
```

```
Send <folder_name> to the recycle bin.
```

```
Add an example.txt file to the <folder_name folder.
```

<img src="https://mintcdn.com/xpanderai-099931d1/P68LGLZO4_ZlQnMM/images/connectors/microsoft-onedrive/gif_1.gif?s=2067a4f3882562b6566d43cac499f1f9" alt="Gif 1" width="800" height="641" data-path="images/connectors/microsoft-onedrive/gif_1.gif" />

## Related Resources

* [Using Tools & Connectors in the xpander.ai platform](/guides/agents/tools-connectors)
* [Microsoft OneDrive Documentation](https://learn.microsoft.com/en-us/onedrive/)
