> ## Documentation Index
> Fetch the complete documentation index at: https://domoinc-openapi-sync-dataflows.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft OneDrive for Business Connector

## Intro

Microsoft OneDrive for Business is an online file sharing and personal cloud content management service for businesses. For more information about the OneDrive API, see [https://msdn.microsoft.com/en-us/lib.../dn659752.aspx](https://msdn.microsoft.com/en-us/library/office/dn659752.aspx "https://msdn.microsoft.com/en-us/library/office/dn659752.aspx").

You connect to your OneDrive for Business account in the Data Center. This topic discusses the fields and menus that are specific to the OneDrive for Business connector user interface. General information for adding DataSets, setting update schedules, and editing DataSet information is discussed in [Adding a DataSet Using a Connector](https://domo-support.domo.com/s/article/360042926274?language=en_US "Adding a DataSet Using a Connector").

## Prerequisites

To connect to your OneDrive for Business account and create a DataSet, you must have the following:

* A OneDrive for Business client secret
* A Microsoft username and password

If you are using the Microsoft Graph, you will need to set your redirect\_uri to a different URL depending on whether you are using a newly registered or existing app.

* If you are using a *newly registered* app, set your redirect\_uri to [https://oauth.domo.com/api/data/v1/oauth/providers/onedrive-business/exchange](https://oauth.domo.com/api/data/v1/oauth/providers/onedrive-business/exchange).
* If you are using an *existing* app, set your redirect\_uri to [https://oauth.domo.com/api/data/v1/oauth/providers/microsoft-onedrive-business/exchange](https://oauth.domo.com/api/data/v1/oauth/providers/microsoft-onedrive-business/exchange).

For instructions about obtaining a OneDrive for Business client ID, and client secret, and registering your app using SharePoint Server 2016, see [https://dev.onedrive.com/app-registration-server.htm](https://dev.onedrive.com/app-registration-server.htm "https://dev.onedrive.com/app-registration-server.htm").

For instructions about registering your app for Microsoft Graph, see [https://docs.microsoft.com/en-us/onedrive/app-registration.htm](https://docs.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/app-registration "https://docs.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/app-registration")

To connect to Microsoft OneDrive for Business to retrieve the information, you must have the following:

* An installed Microsoft Azure app.
* The CLIENT ID and CLIENT SECRET. To generate an app and locate these credentials, see [Microsoft's documentation](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app "Microsoft's documentation"). You may need the following information to register for the app:

  * **Azure Portal:** [https://portal.azure.com/](https://portal.azure.com/ "https://portal.azure.com/")
  * **Sharepoint App to Register:** SharePoint Online Rest API
  * **Domo Re-direct URL:** [https://oauth.domo.com/api/data/v1/oauth/providers/microsoft-onedrive-business/exchange](https://oauth.domo.com/api/data/v1/oauth/providers/microsoft-onedrive-business/exchange "https://oauth.domo.com/api/data/v1/oauth/providers/microsoft-onedrive-business/exchange")
* The Microsoft OneDrive for Business Connector needs the following API permissions.

  * User.Read
  * Files.Read.All
  * offline\_access

## Setting Up the Azure Portal Video

To set up the Azure portal, watch the YouTube video, [How to Set Up the OneDrive for Business Connector](https://www.youtube.com/watch?v=NN9e05qEa3A "How to Set Up the One Drive for Business Connector").

### To Obtain the OneDrive CLIENT ID:

1. Go to [https://portal.azure.com](https://portal.azure.com/ "https://portal.azure.com").
2. Select **Microsoft Entra ID** ([https://learn.microsoft.com/en-us/entra/fundamentals/new-name](https://learn.microsoft.com/en-us/entra/fundamentals/new-name "https://learn.microsoft.com/en-us/entra/fundamentals/new-name") ) **> App registrations**.
3. Find and click on your web app.
4. The "application" ID is your CLIENT ID.

### To obtain the OneDrive CLIENT SECRET:

1. Go to [https://portal.azure.com](https://portal.azure.com/ "https://portal.azure.com").
2. Select **Microsoft Entra ID** ([https://learn.microsoft.com/en-us/entra/fundamentals/new-name](https://learn.microsoft.com/en-us/entra/fundamentals/new-name "https://learn.microsoft.com/en-us/entra/fundamentals/new-name") ) **> App registrations**.
3. Find and click on your web app.
4. Open **Certificates and secrets**.
5. Click **+New Value**.
6. Provide the value description and the expiry period for your secret. Click **Add**.
7. Your new value will appear. Copy the Value field and paste it in your Domo connector Value field.

   <Frame>
     <img alt="Secret.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/XLeSvlwfBHPJHbmY/images/kb/ka0Vq000000A67N-00N5w00000Ri7BU-0EM5w000005vO71.png?fit=max&auto=format&n=XLeSvlwfBHPJHbmY&q=85&s=fb4fbadf207106e9814c8fcf5e5d1b31" width="626" height="126" data-path="images/kb/ka0Vq000000A67N-00N5w00000Ri7BU-0EM5w000005vO71.png" />
   </Frame>

### Creating an Azure App for Enterprise OAuth

To create a Microsoft Azure app, do the following:

1. Log into [https://portal.azure.com](https://portal.azure.com/ "https://portal.azure.com").

2. Click on **App registrations**.

   <Frame>
     <img alt="Capture1.PNG" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/blcgkVgnZv6gj_XY/images/kb/ka05w000001236O-00N5w00000Ri7BU-0EM5w000005vNz7.png?fit=max&auto=format&n=blcgkVgnZv6gj_XY&q=85&s=595e884485e262b8a3b708a307dc1fb7" width="770" height="231" data-path="images/kb/ka05w000001236O-00N5w00000Ri7BU-0EM5w000005vNz7.png" />
   </Frame>

3. Click **New registration**.

4. Enter the application name and select the supported account type. Enter the Redirect URI for Web as
   [https://oauth.domo.com/api/data/v1/oauth/providers/microsoft-onedrive-business/exchange](https://oauth.domo.com/api/data/v1/oauth/providers/microsoft-onedrive-business/exchange "https://oauth.domo.com/api/data/v1/oauth/providers/microsoft-onedrive-business/exchange").

   <Frame>
     <img src="https://mintcdn.com/domoinc-openapi-sync-dataflows/Gw_GOG2-ZFDgkOCF/images/kb/ka0Vq000000Hfun-00N5w00000Ri7BU-0EMVq000002NpNF.jpg?fit=max&auto=format&n=Gw_GOG2-ZFDgkOCF&q=85&s=9342dfca5d5e82b6755fafc30bd9e9e9" style={{width: 869, height: 555}} width="792" height="506" data-path="images/kb/ka0Vq000000Hfun-00N5w00000Ri7BU-0EMVq000002NpNF.jpg" />
   </Frame>

5. Click **Register**.

6. Now, click **API Permissions**.

   <Frame>
     <img alt="API_permission.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/AxiXLKkg9sLcFgsR/images/kb/ka0Vq0000006d0H-00N5w00000Ri7BU-0EM5w000005vO6o.png?fit=max&auto=format&n=AxiXLKkg9sLcFgsR&q=85&s=7469db78ea4d37281c3c825c3e34dac2" width="265" height="426" data-path="images/kb/ka0Vq0000006d0H-00N5w00000Ri7BU-0EM5w000005vO6o.png" />
   </Frame>

7. Click **+Add Permissions** button.

   <Frame>
     <img alt="Capture8.PNG" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/blcgkVgnZv6gj_XY/images/kb/ka05w00000123LH-00N5w00000Ri7BU-0EM5w000005vO61.png?fit=max&auto=format&n=blcgkVgnZv6gj_XY&q=85&s=d361854fb29fa710f256f60117e2dab9" width="369" height="62" data-path="images/kb/ka05w00000123LH-00N5w00000Ri7BU-0EM5w000005vO61.png" />
   </Frame>

8. Select **Microsoft Graph > Delegated Permissions**.

9. Select the permissions as required.

10. After adding the permissions, all configured permissions will be listed as below.

<Frame>
  <img alt="Permissions modified.jpg" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/Gw_GOG2-ZFDgkOCF/images/kb/ka0Vq000000Hfun-00N5w00000Ri7BU-0EMVq000002NqUb.jpg?fit=max&auto=format&n=Gw_GOG2-ZFDgkOCF&q=85&s=2a48169485bf7d4271f37ae40fbe6af6" style={{width: 1545, height: 648}} width="1268" height="532" data-path="images/kb/ka0Vq000000Hfun-00N5w00000Ri7BU-0EMVq000002NqUb.jpg" />
</Frame>

## Connecting to Your OneDrive for Business Account

This section enumerates the **Permission** settings within Microsoft needed for Domo access as well as options in the **Credentials** and **Details** panes in the OneDrive for Business Connector page. The components of the other panes in this page, **Scheduling** and **Name & Describe Your DataSet**, are universal across most connector types and are discussed in greater length in [Adding a DataSet Using a Data Connector](https://domo-support.domo.com/s/article/360042926274?language=en_US "Adding a DataSet Using a Data Connector").

### Credentials Pane

This pane contains fields for entering credentials to connect to your OneDrive for Business account. The following table describes what is needed for each field:

<table border="1" cellpadding="1" cellspacing="1" data-aura-rendered-by="33:195;a"><thead><tr><th colspan="1" rowspan="1"><p><span class="s1"> Field </span></p></th><th colspan="1" rowspan="1"><p><span class="s1"> Description </span></p></th></tr></thead><tbody><tr><td colspan="1" rowspan="1"><p> Client ID </p></td><td colspan="1" rowspan="1"><p> Enter your OneDrive for Business client ID. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Client Secret </p></td><td colspan="1" rowspan="1"><p> Enter your OneDrive for Business client secret. </p></td></tr></tbody></table>

Once you have entered these credentials, you are taken to the Microsoft login screen, where you can enter the username and password for your Microsoft account. After you successfully connect, you can use the same account any time you go to create a new OneDrive for Business DataSet. You can manage connector accounts in the **Accounts** tab in the Data Center. For more information about this tab, see [Managing User Accounts for Connectors](https://domo-support.domo.com/s/article/360042926054?language=en_US "Managing User Accounts for Connectors").

### Details Pane

This pane contains a primary **Reports** menu, along with various other menus which may or may not appear depending on the report type you select.

<table border="1" cellpadding="1" cellspacing="1" data-aura-rendered-by="33:195;a"><thead><tr><th colspan="1" rowspan="1"><p> Menu </p></th><th colspan="1" rowspan="1"><p> Description </p></th></tr></thead><tbody><tr><td colspan="1" rowspan="1"><p> Report </p></td><td colspan="1" rowspan="1"><p> Select the OneDrive for Business report you want to run. The following reports are available: </p><table border="1" cellpadding="1" cellspacing="1"><tbody><tr><td colspan="1" rowspan="1"> Children </td><td colspan="1" rowspan="1"> Lists the children of the item with the specified folder or path. </td></tr><tr><td colspan="1" rowspan="1"> Default Drive </td><td colspan="1" rowspan="1"> Returns metadata about the authenticated user's default drive in OneDrive </td></tr><tr><td colspan="1" rowspan="1"> Download Children Shared File </td><td colspan="1" rowspan="1"> Downloads a Shared file from children folder into Domo as a DataSet. You specify the file type and file/folder or path, along with other information. </td></tr><tr><td colspan="1" rowspan="1"> Download File </td><td colspan="1" rowspan="1"> Downloads a file into Domo as a DataSet. You specify the file type and file/folder or path, along with other information. </td></tr><tr><td colspan="1" rowspan="1"> Download Nested Children Shared File </td><td colspan="1" rowspan="1"> Downloads a shared file from nested children folder into Domo as a DataSet. You specify the folder name and the compelte file path, along with other information. </td></tr><tr><td colspan="1" rowspan="1"> Download Shared File </td><td colspan="1" rowspan="1"> Downloads a Shared file into Domo as a DataSet. You specify the file type and file/folder or path, along with other information. </td></tr><tr><td colspan="1" rowspan="1"> Drive By Id </td><td colspan="1" rowspan="1"> Lists drives for a selected drive ID. </td></tr><tr><td colspan="1" rowspan="1"> Drives </td><td colspan="1" rowspan="1"> Lists the available drives for the authenticated user. </td></tr><tr><td colspan="1" rowspan="1"> Properties </td><td colspan="1" rowspan="1"> Returns properties for the item with the specified file/folder or path. </td></tr><tr><td colspan="1" rowspan="1"> Recent Items </td><td colspan="1" rowspan="1"> Returns a list of items that have been recently used by the authenticated user. This list includes items that are in the user's drive as well as items they have access to from other drives. </td></tr><tr><td colspan="1" rowspan="1"> Shared Items </td><td colspan="1" rowspan="1"> Lists items that are shared with the authenticated user. </td></tr></tbody></table></td></tr><tr><td colspan="1" rowspan="1"> Addressing </td><td colspan="1" rowspan="1"> Specify whether the addressing for the item is ID-based (in which case, you specify a file or folder name) or path-based (in which case, you specify the file path). </td></tr><tr><td colspan="1" rowspan="1"> Path </td><td colspan="1" rowspan="1"> Enter the relative path of the file or folder you want to retrieve a report for. For example: <span class="mt-font-courier-new"> /Documents/test.csv </span></td></tr><tr><td colspan="1" rowspan="1"> File/Folder Name </td><td colspan="1" rowspan="1"> Enter the name (or a portion of the name), without extension, of the MS OneDrive file/folder to retrieve. The connector returns the most recently created or modified file matching the name, based on what you have selected in the <b> Date Field </b> menu. </td></tr><tr><td colspan="1" rowspan="1"> Match Type </td><td colspan="1" rowspan="1"> Specify whether the retrieve file starts with or contains the name you have entered in <b> File Name </b>. </td></tr><tr><td colspan="1" rowspan="1"> Parent Folder/Parent Folder Name </td><td colspan="1" rowspan="1"> Enter a complete folder name (not case-sensitive) to limit the file search to a specific folder's root contents. Subfolders are ignored. If you leave this blank, the search includes all files in all folders for which you have access. </td></tr><tr><td colspan="1" rowspan="1"> Date Field </td><td colspan="1" rowspan="1"><p> Specify whether to retrieve a file based on its creation or last modified date. This is useful when there are multiple files containing the name you have entered in <b> File Name </b>. </p></td></tr><tr><td colspan="1" rowspan="1"> File Type </td><td colspan="1" rowspan="1"> Select the file type for the data file you want to retrieve. </td></tr><tr><td colspan="1" rowspan="1"> Is Password Protected? </td><td colspan="1" rowspan="1"> Select whether the file is password-protected. </td></tr><tr><td colspan="1" rowspan="1"> Sheet Name </td><td colspan="1" rowspan="1"> Enter the sheet name you want to retrieve in the specified spreadsheet. </td></tr><tr><td colspan="1" rowspan="1"> Sheet Name Match Type </td><td colspan="1" rowspan="1"> Select the match type you want to perform on the sheet name. </td></tr><tr><td colspan="1" rowspan="1"> File Name or Portion of File Name to Search For in ZIP </td><td colspan="1" rowspan="1"> Enter the name of the zipped file to retrieve. Leave blank to retrieve the first zipped file. </td></tr><tr><td colspan="1" rowspan="1"> Zipped File Type </td><td colspan="1" rowspan="1"> Select the file type for the zipped data file you want to retrieve. </td></tr><tr><td colspan="1" rowspan="1"> Drive ID </td><td colspan="1" rowspan="1"> Select the drive you want to retrieve information for. </td></tr></tbody></table>

## FAQ

<AccordionGroup>
  <Accordion title="What kind of credentials do I need to power up this connector?">
    You need the client id and client secret of your OneDrive App.
  </Accordion>

  <Accordion title="How often can the data be updated?">
    Datasets should be set to update no more than once per hour.
  </Accordion>

  <Accordion title="Are there any API limits that I need to be aware of?">
    Microsoft limits API calls on a per user/per app basis. To prevent rate limiting, reduce the number of datasets scheduled to run at the same time.
  </Accordion>
</AccordionGroup>
