17
Views
3
Comments
How Can I Retrieve a List of Respondents to a Specific Outlook Email?
Question

Hello,

I'm interested in integrating with Outlook to retrieve information about users who responded to a specific email.

Is there a way to achieve this using the Outlook API or Microsoft Graph?

Or a library that allows this?

Any guidance or examples would be appreciated.


Thanks in advance!

2026-01-28 16-57-48
Mihai Melencu
Champion

Hi @hava sh ,

You can filter by conversationId. For example, this request will return every message in that conversation: 

GET https://graph.microsoft.com/v1.0/me/messages?$filter=conversationId eq '{conversationId}'

You can extract the sender from each by using a query after "from":

GET https://graph.microsoft.com/v1.0/me/messages?$filter=conversationId eq '{conversation-id}'&$select=from

For reference you can check these discussions:


2019-01-07 16-04-16
Siya
 
MVP

@hava sh : You can achieve your requirements using the Microsoft Graph API, as mentioned by @Mihai Melencu . You may also consider using the Microsoft Office 365 Graph Connector for OutSystems available on the Forge. Additionally, it’s worthwhile to watch the NextStep session on integrating OutSystems with Office 365 for more insights.

2025-05-02 20-28-47
Drishti Menghani

Hi Hava,

If your case is On-Premises, then you're likely using Microsoft Exchange Server. In this case, you can integrate using NTLM or Basic Authentication, depending on what your organization allows. This typically involves working with Exchange Web Services (EWS). - Need to use Integration Studio + Visual Code

If your Exchange server is in the cloud, you're probably using Exchange Online (part of Microsoft 365). While Exchange Online still supports EWS, it's being deprecated to favor Microsoft Graph API, which is now the recommended approach. - Need to use Integration Studio + Visual Code 

How To:

For the above two you would need to create an Extension with .Net code using Integration Studio and Visual Code to support the reading of emails, that will act as server actions of extension. For your this approach, you would need, Email, Password, and Email URL to connect to Exchange Mail.

Typical Code will look like this

using Microsoft.Exchange.WebServices.Data;

using System;

using System.Collections.Generic;


public static class ExchangeHelper

{

    public static List GetRecentSubjectLines(string email, string password)

    {

        var service = new ExchangeService(ExchangeVersion.Exchange2010_SP2)

        {

            Credentials = new WebCredentials(email, password),

            Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx")

        };

        FindItemsResults findResults = service.FindItems(WellKnownFolderName.Inbox, new ItemView(10));

        List subjects = new List();


        foreach (Item item in findResults.Items)

        {

            subjects.Add(item.Subject);

        }

        return subjects; //this will return the array of emails received to the given email address.

    }

}

Please take help of GPTs for corrections as per need.

-------------

Now Microsoft Graph API is a recommended and modern way to interact with Outlook and Exchange Online services.

Step 1. Go to Portal.Azure.com and Add App Registration, in that API section, add the API permission Mail Read.

Step 2: Get the end point 

Step 3: With the end point get the access token

POST https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token

Body (x-www-form-urlencoded):

  client_id: {client_id}

  client_secret: {client_secret}

  scope: https://graph.microsoft.com/.default

  grant_type: client_credentials

Consume it in Outsytems.

Once you get the access token call the below through outsystems.

GET https://graph.microsoft.com/v1.0/users/{user-id}/messages

Authorization: Bearer {access_token}

You will end up having the list of messages for a specific user-id  it can either be Email address, or Object Id, better to test it.

I hope this will give you a good idea, how you can approach for your solution.

Also, when you need who respond what, so surely filter using subject, the above API will list all the messages received to an email address, now can easily filter.

If you need any further clarification plz let me know.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.