# IMAP authentication method

1. Add the reusable authentication method:
   1. Click the **Libraries** drop-down menu and select **Authentication Methods**.
   2. Click the **Add Authentication Method** drop-down menu and select **IMAP**.
2. Provide a unique name for the authentication method.
3. Optionally, enter a description to help identify the purpose or scope of this method.
4. Select the **Authentication Type**:
   * **Username and Password**: Enter the IMAP credentials.
   * **OAuth 2.0**: Enter the following information:
     * **Username**: Enter the email address or identifier used for IMAP authentication.
     * **Authority**: Specify the OAuth authority URL or identifier.
     * **Client ID**: Enter the client ID issued by the OAuth provider.
     * **Client Secret**: Enter the client secret.
     * **Scope**: Define the scope of access required for the authentication.
5. **Save** the new authentication method.

**Mapping Microsoft Entra Portal Fields to Automate MFT OAuth Configuration**

When configuring OAuth in Automate MFT using information from the Microsoft Entra portal, the following field mappings apply:

* The **Authority** field is for a URL and the tenant ID shown in the Microsoft portal: `https://login.microsoftonline.com/<Tenant ID>/v2.0`
* The **Client ID** is provided by the Entra portal.
* The **Client Secret** is provided by the Entra portal.
* The **Scope** is: `https://outlook.office365.com/.default`
