# Microsoft 365 authentication

> To create a connection, you need the following:

## Prerequisites

To create a connection, you need the following:

* **Client ID**
* **Client Secret**
* **TenantID**
* **Environment**
* **Email**
* **Scopes**

## App registration

This connector always requires your own Microsoft Azure App Registration. UiPath does not provide a shared application for this connector.

To create and configure an app registration:

1. In the [Microsoft Entra admin center](https://entra.microsoft.com), register a new application. For full instructions, check [Register an application with the Microsoft identity platform](https://learn.microsoft.com/en-us/graph/auth-register-app-v2).
2. Set the application as a **Web** application.
3. Add a **Web** Redirect URI. Set it to: `https://{baseURL}/provisioning_/callback` (for example, `https://<hostname>/provisioning_/callback` for Automation Suite).
4. Add **Delegated** permissions. For the full list of required scopes, see the [Scopes](#scopes) section.
5. Generate a client secret under **Certificates & secrets**.

After setting up the app registration, use the **Client ID**, **Client Secret**, and **TenantID** from the app to create a connection.

## Scopes

Default scopes configured: `Mail.Read`, `Mail.Read.Shared`, `Mail.ReadWrite`, `Mail.ReadWrite.Shared`, `Mail.Send`, `Mail.Send.Shared`, `MailboxSettings.ReadWrite`, `Calendars.Read`, `Calendars.Read.Shared`, `Calendars.ReadWrite`, `Calendars.ReadWrite.Shared`, `profile`, `openid`, `email`, `offline_access`, `User.Read`.

:::note
All listed Microsoft Graph permissions are delegated permissions.
This means the connection operates on behalf of the signed-in user, and the access granted is limited to what that user is allowed to do in Microsoft 365.
:::

For more details on authentication, check [Microsoft 365 HTTP Request](https://docs.uipath.com/activities/other/latest/productivity/office365-general-http-request-connections).

## Add the Microsoft 365 authentication

1. In Automation Cloud, select Integration Service from the rail menu.
2. From the **Connectors** list, select Microsoft 365. You can also use the search bar to find the connector.
3. Select the **Connect to Microsoft 365** button.
4. Enter the required credentials.
5. Fill in the **OAuth Scope** field with the scopes you need.
6. Select **Connect**.
