# Set up OneDrive Connector

To set up OneDrive Connector, proceed as follows:

* To go to the Connector template, select the Connector menu item under the “APIs and integration” menu.
*

```
<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/odconnecmenu.png" alt=""><figcaption></figcaption></figure>
```

* In the “APIs and integration” page, click the \[+ Connector] button.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/odaddconnect.png" alt=""><figcaption></figcaption></figure>

* In the “New Connector” page, the Connector > Details tab is preselected.\
  Enter the connector name and optionally describe the connector.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/onedrive123.png" alt=""><figcaption></figcaption></figure>

* Select OneDrive in Connector settings.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/odconnsel.png" alt=""><figcaption></figcaption></figure>

* In the Connector settings, the OAuth 2.0 client settings are displayed.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/odsettblank.png" alt=""><figcaption></figcaption></figure>

* Enter the information (Credentials) generated in [Microsoft Azure Account Setup](/welcome/in-depth-learning/connectors/onedrive-connector/setting-up-microsoft-azure-account.md):&#x20;
  1. Client ID&#x20;
  2. Client Secret

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/odsettclientidsecrlabel.png" alt=""><figcaption></figcaption></figure>

* Click \[Save] to save the details.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/odsettclientidsecrmasksave.png" alt=""><figcaption></figcaption></figure>

* A success message displays for successful connector creation.
* On clicking the \[Save] button, the “Authorize by” section is activated and a redirect URL is generated.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/odsettredurlmasked.png" alt=""><figcaption></figcaption></figure>

* For authorization through Redirect URL, follow the instructions below the url: \
  “Copy the url above and add in Redirect URIs of Registered Application in Azure Active Directory. Authentication -> Navigate to Redirect URIs Section -> Add URI”
* This generated URL needs to be copied and entered into Authorized Redirect URIs in OAuth 2.0 Client ID of created credentials in the Microsoft Account. (click [here](/welcome/in-depth-learning/connectors/onedrive-connector/add-url-to-authorized-redirect-urls.md) for the steps for copying Redirect URI in Azure)
* When the URL is copied, click the \[Sign in with Microsoft] button which will take the user to the consent screen.

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/odsigninwithmicrosoft.png" alt=""><figcaption></figcaption></figure>

* In this step, the user is asked to enter information indicating their agreement to the connection Langstack is trying to establish with OneDrive. (click [here](/welcome/in-depth-learning/connectors/onedrive-connector/user-consent-for-establishing-onedrive-connection.md) for the steps for user consent screen)

<figure><img src="https://media.langstack.com/documentation/media/images/connector/onedriveconnector/odappaccinfosignin.png" alt=""><figcaption></figcaption></figure>

* Click the \[Test Connection] button to confirm if the connection is established.

<figure><img src="/files/srdm9IJPC7DeD6PzXM6R" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.langstack.com/welcome/in-depth-learning/connectors/onedrive-connector/set-up-onedrive-connector.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
