# Microsoft Auth Provider To let the app authenticate users via Microsoft, we need the following values: 1. **Application (client) ID** 2. **Redirect URI** 3. **Directory (tenant) ID** 4. **Client secret (value)** 5. **Secret ID** Except for the client secret, these usually follow this pattern: `a1b2c3d4-ab34-cd48-ab12-1a2b3c4e5f67` ## 1. Register the app in Azure To allow authentication via Microsoft, the app must be registered in the [Azure Portal](https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade). Click **New registration** and give the application any name you like. Then specify a **Redirect URI** further down: choose **Single-page application (SPA)** as the platform and enter the login URI of your website as the redirect URI (for example `https://www.domain.de/auth/login`). Click **Register** to finish. Your app will now be listed. This page also shows the first value you need: the **Application (client) ID**. ## 2. App overview in Azure Click the name of your registered app to open its overview. There you'll find a summary of all general data, including the **Directory (tenant) ID** — the second value you need. ## 3. App secrets On the overview page, the left sidebar contains a **Manage** menu item. Expanding it reveals more entries, including **Certificates & secrets**. Open it. Go to the **Client secrets** tab and click **New client secret**. Give the secret any name and an expiry of your choice. **Important: once the secret expires, you must create a new client secret and send us the corresponding values again.** After creation, the table shows an entry containing the last two values we need: 1. The **Value** column shows the **client secret (value)**. It is only shown in full once, so make sure to copy and store this value right after creating it. _(If you make a mistake here, simply create a new client secret.)_ 2. The **Secret ID** column contains the final value we need. It is always shown and does not necessarily need to be stored separately. ## 4. Contact us To configure the app accordingly, we need the values listed above. Send them to us and we'll take care of the rest! ### Parse Server — secrets for Microsoft authentication So the server can communicate with Microsoft, we need the values generated in your Azure Portal. The following secrets must be set as environment variables: OI_MICROSOFT_CLIENT_ID=Secret ID OI_MICROSOFT_CLIENT_SECRET=Client secret (value) OI_MICROSOFT_TENANT_ID=Directory (tenant) ID OI_MICROSOFT_APP_ID=Application (client) ID ### open.DASH — registering Microsoft authentication In the frontend, Microsoft authentication can be enabled by calling the `.setMicrosoftLogin` method and passing the corresponding data. Here is an example call with all required values: ```js $parse.auth.setMicrosoftLogin({ clientId: "Application (client) ID", redirectUri: "Redirect URI", authority: `https://login.microsoftonline.com/Directory-tenant-ID`, }); ```