Configuring Cozyroc IMAP/SMTP+ Connection Managers for Microsoft Outlook (OAuth2 Setup Guide)

Configuring Cozyroc IMAP/SMTP+ Connection Managers for Microsoft Outlook (OAuth2 Setup Guide)

Overview

Below you can find a full, comprehensible guide on setting up the Cozyroc IMAP/SMTP+ connection managers for Microsoft Exchange Email Server.


Step 1: Open Azure Portal

Open the Azure Portal. In the search bar, type App Registrations and open the corresponding page.



Step 2: Create a New Registration

Click on the New Registration button.



Step 3: Configure the Application

Configure the app registration. You may change the Name and Supported Account Types if necessary. Success with the second option may vary depending on your environment.

Make sure to enter the Cozyroc callback URL as a redirect:

https://www.cozyroc.com/oauth_callback


Step 4: Add Application Permissions

Navigate to the App Permissions section and click Add permission. Some permissions may require administrator consent.



Step 5: Select Microsoft Graph

Click Microsoft Graph and then select Delegated permissions.



Step 6: Add Required Permissions

Search for and add the following permissions:

Optional permissions:

  • IMAP.AccessAsUser.All
  • SMTP.Send

Required permissions:

  • offline_access
  • User.Read


Step 7: Create Client Secret

Navigate to the Certificates & Secrets section and click New client secret.

Create the secret and make note of the Secret Value. This will be the only time it is visible, so store it securely.



Step 8: Configure Cozyroc Connection Manager

Open Visual Studio and create a new Cozyroc IMAP/SMTP+ connection manager.

Under the Advanced tab, select:

  • Authentication Type: MicrosoftOAuth2



Step 9: Generate OAuth2 Token

From the main panel, click New in the token grid.

Enter the following:

  • Client Secret Value
  • Application (Client) ID

Administrator consent may be required for the application.



Step 10: Configure IMAP and SMTP Settings

Use the following configuration values:

IMAP Configuration

  • Host: imap-mail.outlook.com or outlook.office365.com
  • Port: 993
  • Connection Type: ImplicitTLS

SMTP Configuration

  • Host: smtp-mail.outlook.com
  • Port: 587
  • Connection Type: ExplicitTLS


Step 11: Test the Connection

Click Test Connection and confirm the connection succeeds.

If an issue occurs, enable verbose logging in the Advanced tab to review detailed diagnostics.



Troubleshooting

You may encounter a Connection timed out error.

To troubleshoot:

  • Verify the IMAP/SMTP host and port using telnet
  • Ping the server to confirm connectivity
  • Ensure DNS resolution works properly
  • Try switching your DNS server
  • If necessary, resolve the host to its IP address and test directly


    Book a Success Call

    Need Help?
    Evaluating COZYROC? --> Success Call
    Customers --> Submit a Ticket