> For the complete documentation index, see [llms.txt](https://bb-docs.gitbook.io/microsoft-onedrive-plugin/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/microsoft-onedrive-plugin/help-guide/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

<div align="left"><figure><img src="https://3356960064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2PHGBUw9RT855vFwBGrx%2Fuploads%2Fn1o8OGIBC5igkv8Ikk2X%2F1.png?alt=media&amp;token=b76b81d7-4f59-4b44-8986-7cdc027dda8a" alt=""><figcaption></figcaption></figure></div>

3. Register a **new application**

<div align="left"><figure><img src="https://3356960064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2PHGBUw9RT855vFwBGrx%2Fuploads%2FnpNYr4P5wngJwpolcTrK%2F2.png?alt=media&amp;token=f0fc8d5d-35eb-49b7-9955-6973e66896ca" alt=""><figcaption></figcaption></figure></div>

4. Fill out the **form**

<div align="left"><figure><img src="https://3356960064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2PHGBUw9RT855vFwBGrx%2Fuploads%2Fj4MeyJNHoFCPIwgCr7Qn%2F3.png?alt=media&amp;token=6d7faa47-44cc-40ae-8f01-4baedefe6866" alt=""><figcaption></figcaption></figure></div>

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

<div align="left"><figure><img src="https://3356960064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2PHGBUw9RT855vFwBGrx%2Fuploads%2FqPyNgToUhH0FwPZhos0N%2F4.png?alt=media&amp;token=5deb54ec-25da-45da-82c8-1ac6d9986c5a" alt=""><figcaption></figcaption></figure></div>

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

<div align="left"><figure><img src="https://3356960064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2PHGBUw9RT855vFwBGrx%2Fuploads%2Fb8JIGgdx7DvUzvCe8kW5%2F5.png?alt=media&amp;token=c4ac7c58-d280-4950-8a4f-df9cb33cead5" alt=""><figcaption></figcaption></figure></div>

7. Add the **permissions** below

<div align="left"><figure><img src="https://3356960064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2PHGBUw9RT855vFwBGrx%2Fuploads%2FecXikDTlNfDH4mxjKWcp%2F6.png?alt=media&amp;token=892e9553-fcb9-434e-93cf-754238d0ca08" alt=""><figcaption></figcaption></figure></div>

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

<div align="left"><figure><img src="https://3356960064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2PHGBUw9RT855vFwBGrx%2Fuploads%2F0jnymaUUSr0ZvXGTBD72%2F7.png?alt=media&amp;token=2a09fa09-bcec-4151-8f89-ef976d79af91" alt=""><figcaption></figcaption></figure></div>

10. Performing the **Login**

<div align="left"><figure><img src="https://3356960064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2PHGBUw9RT855vFwBGrx%2Fuploads%2FVNBUrx9shmr6y8UwCGhd%2F8.png?alt=media&amp;token=be7f67be-6d74-4c86-bea7-fde0679b4277" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://3356960064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2PHGBUw9RT855vFwBGrx%2Fuploads%2FCH3m89VO5cfjmafHnPBV%2F9.png?alt=media&amp;token=d4e5d663-ce30-44c0-b753-5106a308065d" alt=""><figcaption></figcaption></figure></div>

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 %}

<div align="left"><figure><img src="https://3356960064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2PHGBUw9RT855vFwBGrx%2Fuploads%2FnW7iZznHgFWg4qDLhFCv%2F11.png?alt=media&amp;token=044dc3e0-b1cd-4e8a-a6ce-72a2d860fdf6" alt=""><figcaption></figcaption></figure></div>

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

<div align="left"><figure><img src="https://3356960064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2PHGBUw9RT855vFwBGrx%2Fuploads%2Fw9YAXHNKwsG62ySRA58S%2F10.png?alt=media&amp;token=e7d73c34-515f-45a3-9aae-cf90a139b479" alt=""><figcaption></figcaption></figure></div>
