> For the complete documentation index, see [llms.txt](https://bb-docs.gitbook.io/bubweb-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bb-docs.gitbook.io/bubweb-doc/plugins/microsoft-onedrive/getting-started.md).

# Getting Started

1. Sign in to your [**Microsoft Azure account**](https://azure.microsoft.com/en-us/free/)
2. Select the **Azure Active Directory** option

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

3. Register a **new application**

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

4. Fill out the **form**

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

5. **Copy** the **Client ID** of the created application

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

6. Create a **new client secret** and **copy** its **value**

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

7. Add the **permissions** below

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

8. With the Microsoft OneDrive plugin installed in your project, **paste** the credentials **(App ID, App Secret)**
9. Enable the **"Use a generic redirect URL"** option

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

10. Performing the **Login**

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

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

11. **Log the user out**

{% hint style="info" %} <mark style="color:blue;">**OAuth**</mark> <mark style="color:blue;"></mark><mark style="color:blue;">is inherently stateless so there is really nothing to</mark> <mark style="color:blue;"></mark><mark style="color:blue;">**"sign out"**</mark> <mark style="color:blue;"></mark><mark style="color:blue;">of. When you complete the OAuth flow you receive a token back. That token is used to authenticate the user</mark> <mark style="color:blue;"></mark>*<mark style="color:blue;">every time</mark>* <mark style="color:blue;"></mark><mark style="color:blue;">you call the API.</mark>

<mark style="color:blue;">So to</mark> <mark style="color:blue;"></mark><mark style="color:blue;">**"sign out"**</mark><mark style="color:blue;">, simply wipe any stored access token values from your app's memory/storage and the app will no longer have access to that user's account</mark>.
{% endhint %}

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

11. Using the Microsoft OneDrive Plugin **functions**

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://bb-docs.gitbook.io/bubweb-doc/plugins/microsoft-onedrive/getting-started.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.
