MSGraph Mail Poller

Overview

Need to poll emails from your Exchange server? This smart service can be used in a poller process and extract the data from the Microsoft Exchange server. Messages are stored in the Appian Document System, as well as the attachments. Meta data is stored in a database table for further processing.

This plug-in provides an alternative to sending emails to an Appian process model when inbound email integration is requested. Instead of the email being forwarded to Appian, this plug-in reads the emails directly from the Exchange mailbox using the MS Graph API as described below:

  • Reads the mailbox(including digitally signed emails) using the MS Graph API
  • Convert the email to an EML file stored as an Appian document, with attachments removed from it
  • Store all email attachments as separate Appian documents
  • Store all email metadata (subject, author, recipients, etc...) into a set of tables in the database

Key Features & Functionality

  • All information how to deploy, configure and use the smart service is in the 'MS Graph Mail Poller.pdf' document in the downloaded zip.
  • Extract the files in the ZIP and follow the instructions in the document.
  • This plugin currently supports only MySQL and Oracle databases.
Anonymous
  • Bearer Token Not Being Passed in Proxied Requests to Microsoft Graph API

    Issue Description:
    When using the MS Graph Mail Poller plugin (version 4.3.2) with proxy authentication enabled (isConnectedViaProxy = true), requests to Microsoft Graph API fail with HTTP 401 Unauthorized errors. The Bearer access token is not being included in the API requests.

    Root Cause:
    In the MSGraphConnector.java file, the OkHttpClient (serviceHttpClient) is being built at line 73 BEFORE the TokenCredentialAuthProvider is created at line 97-99. This means the HTTP client is constructed without any mechanism to attach authentication tokens to outgoing requests. Even though the TokenCredentialAuthProvider is later passed to the GraphServiceClient builder, the underlying HTTP client was already finalized without token support, so it never adds the Bearer token to requests.

    Suggested Fix:
    The code in the isConnectedViaProxy block needs to be restructured:

    1. Remove the early serviceHttpClient build (lines 67-73)
    2. Create the TokenCredentialAuthProvider first (before building the HTTP client)
    3. Use HttpClients.createDefault(tokenCredentialAuthProvider).newBuilder() to initialize the HTTP client builder - this ensures tokens are automatically included
    4. Add proxy settings, timeouts, and proxy authenticator to the builder
    5. Build the serviceHttpClient as the LAST step after all configuration is complete

    The key is using HttpClients.createDefault(tokenCredentialAuthProvider) which creates an OkHttpClient.Builder that's pre-configured to inject Bearer tokens into all requests. The current code bypasses this by creating a plain OkHttpClient.Builder without the token provider.

    Impact:
    Without this fix, proxy-authenticated environments cannot retrieve emails. With the fix, Bearer tokens are properly included and authentication succeeds.

  • Hello Team,

    The plugin seems to replace special characters with a question mark. Is this an expected behaviour? Thank you in advance.

    Eg: Subject line - テスト日本ඞ﷽

    Whats written to the DB - ??????????

  • v4.3.2 Release Notes

    • Updated DBHandler to fix SQLi vulnerabilities.
  • v4.3.1 Release Notes
    • Security Updates - High
  • v4.3.0 Release Notes
    • Conversation ID and Conversation Index are now saved from the inbound email to the database.

    • Additional Note:
    • Use the add-on database scripts from supplemental files while upgrading.
    • This DB scripts are add on to the existing ones in the supplemental files and to be used only after upgrading to new version. If using old version existing DB scripts works, if using V4.3.0 and above use existing ones + add-on DB scripts.

  • v4.2.12 Release Notes

    • Upgraded angus dependencies for vulnerability fixes.

  • v4.2.11 Release Notes
    • Performance improvement for handling large sets of email attachments.
  • Could you share the Tomcat error stack trace?

  • I've tried this workaround but didn't works.
    Appian release 25.2
    Plugin ver. 4.2.10

       Have you solved?

      Any other suggestions? 

    Thanks!

  • If you're using Appian 25.2, there's a known library incompatibility that's resolved in the latest version. You can also try the following steps:

    1. Remove the plugin from the Admin Console.

    2. Reinstall the plugin.

    3. Delete and recreate the smart service