# 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="https://518164421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT1Q1qC2wVXGuHGdhKlFm%2Fuploads%2FKhG274fgLEAjf3WL769A%2F1.png?alt=media&#x26;token=82147dda-d3e5-4bf6-91ee-df9236784b3a" alt=""><figcaption></figcaption></figure>

3. Register a **new application**

<figure><img src="https://518164421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT1Q1qC2wVXGuHGdhKlFm%2Fuploads%2FG1FlKYSMv5K2HsbYaz4w%2F2.png?alt=media&#x26;token=3e601613-f6dc-4fb2-a3a0-123e7f90e5fd" alt=""><figcaption></figcaption></figure>

4. Fill out the **form**

<figure><img src="https://518164421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT1Q1qC2wVXGuHGdhKlFm%2Fuploads%2F9qW0u7XyvNcLn4ACI0aE%2F3.png?alt=media&#x26;token=ccf9f314-d7b8-41cf-aa38-e043255182cd" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://518164421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT1Q1qC2wVXGuHGdhKlFm%2Fuploads%2FXH3qLDXM390smYYBw5tg%2F4.png?alt=media&#x26;token=4530d990-1feb-4dbd-ade5-27047bc2151c" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://518164421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT1Q1qC2wVXGuHGdhKlFm%2Fuploads%2F1hYz3E3VRt0CmVRK9F5S%2F5.png?alt=media&#x26;token=6693331e-8694-44b0-af1c-e93b20855513" alt=""><figcaption></figcaption></figure>

7. Add the **permissions** below

<figure><img src="https://518164421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT1Q1qC2wVXGuHGdhKlFm%2Fuploads%2F6AbRz0LoBkXScNhmQoH7%2F6.png?alt=media&#x26;token=8af4e157-b87b-4a74-bbc1-c9df70752aaf" 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="https://518164421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT1Q1qC2wVXGuHGdhKlFm%2Fuploads%2FNgfAHXXErBkW21O1DCzm%2F7.png?alt=media&#x26;token=49e3b9a2-5952-4fa7-af8d-f29463d69273" alt=""><figcaption></figcaption></figure>

10. Performing the **Login**

<figure><img src="https://518164421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT1Q1qC2wVXGuHGdhKlFm%2Fuploads%2FgkdUgteomNJvS4j7lIGv%2F8.png?alt=media&#x26;token=08ffaabc-46e8-4010-a590-3ef97c258f32" alt=""><figcaption></figcaption></figure>

<figure><img src="https://518164421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT1Q1qC2wVXGuHGdhKlFm%2Fuploads%2FA8RyQXV8PYbyswQdL1Rc%2F9.png?alt=media&#x26;token=221c9296-20c9-40fc-ada3-ec1857271ae7" 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="https://518164421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT1Q1qC2wVXGuHGdhKlFm%2Fuploads%2FpBQq9AvM8IOTMOwrjWUZ%2F11.png?alt=media&#x26;token=f2f1d268-53cd-4d77-978e-8811dc958781" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://518164421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT1Q1qC2wVXGuHGdhKlFm%2Fuploads%2FR6p76Phfw413AwYltkn7%2F10.png?alt=media&#x26;token=a37ac2ec-ced3-47ba-a1f0-e9d432114ce5" alt=""><figcaption></figcaption></figure>
