# Office 365 OAuth 2.0 (old)

{% hint style="warning" %}
This article has been moved from its original location in the Admin Guide.
{% endhint %}

MangoApps supports OAuth - an open-standard framework and specification for authorizing client applications to access online resources. Authorization works by requiring a client to obtain an access token from a Server that in turn grants the client access to MangoApps protected resources.

MangoApps supports **Google Apps & Office 365** as out-of-the-box connections. Additionally, you can configure a custom (OAuth2) connection using ‘OpenID Connect’. This section describes the steps to configure OAuth2 for MangoApps.

<figure><img src="https://guides.mangoapps.com/~gitbook/image?url=https%3A%2F%2F1733114811-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-Lclpq021Ai9jH1_X4gO%252F-Ls0Pl3cvl-A7ASJui3g%252F-Ls0QWHnYoHvaWi0WtTS%252Fimage.png%3Falt%3Dmedia%26token%3D45547e5e-88da-46b0-a36a-b4af5a7cae8f&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=31c0b25b&#x26;sv=2" alt=""><figcaption></figcaption></figure>

1\. Displays the name of the configured OAuth2 Provider.

2\. **Manage Settings**: Allows you to edit the existing configuration for the connection.

3\. **Configure User Mappings**: Syncs the user profile field values from the Provider into MangoApps

4\. **Toggle Bar**: Click the **toggle bar** to enable/disable the connection.

5\. Add SSO Connection.

#### &#x20;<a href="#undefined" id="undefined"></a>

#### Office 365 <a href="#office-365" id="office-365"></a>

O365 can be used as a OAuth2 provider to authenticate & authorize the users logging into MangoApps.

1\. Select the provider as Office 365.

2\. Confirm the Application label.

3\. (**Optional**) Enabling JIT allows for creating of non-existent user accounts in MangoApps. In other words, JIT is the ability to dynamically create user accounts for OAuth Provider authenticated users, when they access a MangoApps for the first time.

4\. Enter a logout URL where users would be redirected after signing off from the custom application.

5\. Use Enterprise Credentials **(ONLY for private cloud & on-premise customers)**

Enable this setting if you want MangoApps to use the credentials of the App your company has registered in Office 365 Azure directory. Enable this if you’re a MangoApps private cloud or on-premise customer only. If **you’re a shared cloud customer please keep this setting disabled** as MangoApps will automatically handle the app registration.

Refer the following video to configure O365 for OAuth

<figure><img src="https://guides.mangoapps.com/~gitbook/image?url=https%3A%2F%2F1733114811-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-Lclpq021Ai9jH1_X4gO%252F-Ls0SAoFZmFyLK9l0Ycj%252F-Ls0ShPvfoKDQosgGfCx%252Fimage.png%3Falt%3Dmedia%26token%3Df7898283-b7a1-4abb-bdba-a71d073ce1a1&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=5c2227ba&#x26;sv=2" alt=""><figcaption></figcaption></figure>

5\. Enter Client ID & Secret created in the Azure’s app registration for O365.

6\. Enter the Authorized Redirect URL as https\://\<mangodomain>.com/oauth2/complete

7\. Enter the Javascript origins URL as https\://\<mangodomain>.com

8\. The Auth & Token URL from Azure Endpoints section.

#### &#x20;<a href="#vendor-walkthrough-videos" id="vendor-walkthrough-videos"></a>


---

# 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://guides.mangoapps.com/integrations-guide/single-sign-on/sso-integrations-by-provider/sso-integrations-for-microsoft/office-365-oauth-2.0-old.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.
