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

# PEX Connector for OneDrive

> The PEX Connector for OneDrive allows Admins to download and sync Cardholder receipts into OneDrive.

## Connect PEX and OneDrive

To connect your PEX and OneDrive from the PEX Marketplace follow these steps:

<Steps>
  <Step>
    Log in to [http://dashboard.pexcard.com/](http://dashboard.pexcard.com/?utm_source=support)
  </Step>

  <Step>
    Navigate to [Apps > Available](https://dashboard.pexcard.com/apps/available?utm_source=support)
  </Step>

  <Step>
    Locate **Connector for OneDrive**.
  </Step>

  <Step>
    Click **More info** > **Install** > **Launch**.
  </Step>
</Steps>

<Note>
  **Note:**

  To install the connector, you need to enable the following permissions: *Edit business settings & apps*, *Manage cardholder*, *View card transactions*. You can enable them in [My Profile -> Permissions](https://dashboard.pexcard.com/account/permissions?utm_source=support).
</Note>

<Steps>
  <Step>
    Once the app has launched for the first time click "Connect" on the right side panel to begin.

    <Frame>
      <img src="https://mintcdn.com/pextest/xypx-ybj5g7dsVoG/images/administrator-guide/pex-connector-for-onedrive/image-1.png?fit=max&auto=format&n=xypx-ybj5g7dsVoG&q=85&s=cd5f084e247870b0ceefd2c38f1c0960" alt="image.png" width="619" height="226" data-path="images/administrator-guide/pex-connector-for-onedrive/image-1.png" />
    </Frame>
  </Step>

  <Step>
    The app will request the following permissions to read your file structure. Click "Continue".

    <Frame>
      <img src="https://mintcdn.com/pextest/xypx-ybj5g7dsVoG/images/administrator-guide/pex-connector-for-onedrive/image-2.png?fit=max&auto=format&n=xypx-ybj5g7dsVoG&q=85&s=b3e7e4a17cf206ca7a3a6f73a7a0ff25" alt="image.png" width="731" height="861" data-path="images/administrator-guide/pex-connector-for-onedrive/image-2.png" />
    </Frame>
  </Step>

  <Step>
    You will be directed to "Sign In" or select an already signed in OneDrive account. Click "Accept" to give PEX permission to access your OneDrive.

    <Frame>
      <img src="https://mintcdn.com/pextest/xypx-ybj5g7dsVoG/images/administrator-guide/pex-connector-for-onedrive/image-3.png?fit=max&auto=format&n=xypx-ybj5g7dsVoG&q=85&s=25f84e535ce7e1347092a185d0792ef5" alt="image.png" width="570" height="700" data-path="images/administrator-guide/pex-connector-for-onedrive/image-3.png" />
    </Frame>
  </Step>
</Steps>

## Configure settings

<Steps>
  <Step>
    Fill in following options:

    * Purchase Receipts. Select "Approved" or "All" transactions ("Approved" is recommended).
      * Start Date. This is the date to start syncing from.
      * End Date. This is the final date of sync.
      * Path Template. Customize how you would like your receipts to be displayed within your OneDrive folder. Click the arrow on the right side to select one of the different file options.
      * Automatic Sync. Enable this to sync receipts every hour.
  </Step>

  <Step>
    Press "Sync Receipts".

    <Frame>
      <img src="https://mintcdn.com/pextest/xypx-ybj5g7dsVoG/images/administrator-guide/pex-connector-for-onedrive/image-4.png?fit=max&auto=format&n=xypx-ybj5g7dsVoG&q=85&s=4c6eb142084b2215e85ad0682f15c40d" alt="image.png" width="1242" height="760" data-path="images/administrator-guide/pex-connector-for-onedrive/image-4.png" />
    </Frame>

    If there are no Start and End dates entered when you click "Sync Receipts", the connector will default to the 1st day of the prior month. When automatic sync is **on**, the connector auto optimizes its dates to the same 1st day of the prior month.
  </Step>
</Steps>

To pause or stop syncing receipts from PEX into OneDrive, press the "Disconnect" button.

<Frame>
  <img src="https://mintcdn.com/pextest/xypx-ybj5g7dsVoG/images/administrator-guide/pex-connector-for-onedrive/image-5.png?fit=max&auto=format&n=xypx-ybj5g7dsVoG&q=85&s=567a011e36115c61166ed050b1e595a7" alt="image.png" width="668" height="155" data-path="images/administrator-guide/pex-connector-for-onedrive/image-5.png" />
</Frame>

## FAQ

<AccordionGroup>
  <Accordion title="What happens/shows up if all of your Approved Transactions are synced over but you're missing a transaction that turns out to be unapproved?">
    On the history tab, there is a view of all receipts “total” and the total number that have been synced “processed”.

    <Frame>
      <img src="https://mintcdn.com/pextest/xypx-ybj5g7dsVoG/images/administrator-guide/pex-connector-for-onedrive/image-6.png?fit=max&auto=format&n=xypx-ybj5g7dsVoG&q=85&s=93538bd94afffad44920af66f87b4698" alt="" width="1189" height="62" data-path="images/administrator-guide/pex-connector-for-onedrive/image-6.png" />
    </Frame>
  </Accordion>

  <Accordion title="How often does it sync if you don't enable the auto sync to sync hourly?">
    It will sync every time you click the “Sync Receipts” button.

    <Frame>
      <img src="https://mintcdn.com/pextest/xypx-ybj5g7dsVoG/images/administrator-guide/pex-connector-for-onedrive/image-7.png?fit=max&auto=format&n=xypx-ybj5g7dsVoG&q=85&s=c24e83eea1958c7964bf0f9be738eaae" alt="" width="176" height="55" data-path="images/administrator-guide/pex-connector-for-onedrive/image-7.png" />
    </Frame>
  </Accordion>

  <Accordion title="What do the permissions mean when connecting to OneDrive?">
    Default OpenId scopes:

    * `openid` - The app receives a unique identifier for the user.
    * `profile` - Allows the app to see your users' basic info (name, picture, user name).
    * `email` - Allows the app to see your users' primary email address.

    Additional OpenId scope:

    * `offline_access` - Allows the app to store and refresh its tokens used for API access.

    Microsoft Graph Scopes:

    * `User.Read` - Allows users to sign-in to the app, and allows the app to read the profile of signed-in users. It also allows the app to read basic company information of signed-in users.
    * `Files.ReadWrite.AppFolder` - Allows the app to read, create, update, and delete files in the **application's** folder. The user's other files and folders are never accessed by the application.
  </Accordion>

  <Accordion title="What does each status mean in the top right bar on the Manage page?">
    * Idle - PEX is not actively syncing to OneDrive (ad hoc syncs only)
    * Pending - PEX is connecting to sync automatically (each hour) to OneDrive
    * Syncing - PEX is syncing automatically (each hour) to OneDrive
  </Accordion>

  <Accordion title="Are there any limitations for the start date?">
    The Start Date is max 1 year in the past.
  </Accordion>

  <Accordion title="Does the sync end date have any limitations if an Admin wants to sync back only, say, a specific period of time in the past?">
    The only limitation is up to 1 year in the past. The user could do however June 15 - December 15 2024 if they wanted to (assuming today is June 15, 2025).
  </Accordion>

  <Accordion title="Where does the Path Template come from?">
    We’ve incorporated feedback to come up with the most common types of configurations. Let us know if you have another preferred way to store receipts and we can update accordingly.
  </Accordion>

  <Accordion title="How do I re-download receipts?">
    Previously synced receipts will not re-download if the file is already present in the PEX Receipts file hierarchy or if it has a sync note from being previously downloaded.

    <Frame>
      <img src="https://mintcdn.com/pextest/xypx-ybj5g7dsVoG/images/administrator-guide/pex-connector-for-onedrive/image-8.png?fit=max&auto=format&n=xypx-ybj5g7dsVoG&q=85&s=664215d7bee3c302c6393796fb4ebf5e" alt="image.png" width="871" height="534" data-path="images/administrator-guide/pex-connector-for-onedrive/image-8.png" />
    </Frame>

    In order to re-download receipts, delete the sync note (shown above) on the relevant transactions and click "Sync Receipts" or wait for automatic sync to sync the receipts.
  </Accordion>

  <Accordion title="What does the Disconnect button do?">
    The disconnect button removes the connection between PEX and the OneDrive account. If you disconnect, receipts will no longer port over into OneDrive.
  </Accordion>
</AccordionGroup>

## Support & Inquiries

For any questions related to your connector, please email [appsupport+onedrive@pexcard.com](mailto:appsupport+onedrive@pexcard.com)
