Skip to main content

How to extract the list of Outlook items sent " on behalf " of a mailbox

One of the exclusive features of Promodag Reports since version 10 was the possibility to display separately the messages sent " on behalf of " a mailbox with the name of the mailbox. Unfortunately, the information we extract from the Exchange on-premises tracking logs is no longer retrievable from Exchange Online and all messages sent by a delegate are therefore considered as having been sent by him. Even worse, the Outlook element properties corresponding to the sent message do not contain any indication about the delegator. However, there is a workaround to count these messages.

Enable copying of sent items

It is indeed possible to create a copy of the Outlook item sent by the delegate in the Sent Items folder of the delegator's mailbox using a specific PowerShell command.
To do this, we need to run Windows PowerShell as an administrator and connect to Office 365 using this script:

$UserCredential = Get-Credential
Connect-ExchangeOnline -Credential $UserCredential -ShowProgress $true

we will enter the credentials of an Office 365 administrator account, then run the following command:

Set-Mailbox <delegator's email address> -MessageCopyForSendOnBehalfEnabled $true

For example, the command would be

Set-Mailbox PromodagReports@promodagdev.onmicrosoft.com -MessageCopyForSendOnBehalfEnabled $true

if we want to copy messages sent by any delegate of the “Promodag Reports User” mailbox into the sent items of the latter mailbox.
It is useful to do a "Send On Behalf Of" test and open the Sent Items folder of the delegate's mailbox to check that the copy mechanism is active.

Scan the contents of the folder Items sent from the delegator's mailbox

The next step is to run the General Mailbox Content report on the Sent Items folder of the mailbox. Here's how to do it:

  • Select the mailbox to analyze,

Select the delegator's mailbox

  • Select the Sent Items folder,

Select the Sent Items folder

  • Define a time filter if necessary. To retrieve only the elements less than 7 days old, use the filter Created on >= 7 days.

Filter on messages newer than 7 days

  • Set the level of detail to Item,

Drill down to the Item level

  • Select Exploring form as output and check the properties to be extracted: at least, Sender address and Sender name.

Select Exploring form as output

We can see that the Sent Items folder of Promodag Reports User contains a message whose sender is Administrator.

The content of the form can then be exported in CSV format via the File > Export option.

Conclusion

We hope that this tutorial will help you fill in the gaps in the information currently returned by the PowerShell commands provided by Microsoft. This report, like all others, can be automated and exported at regular intervals. In this case, we recommend that you choose the CSV file format, as the exploration form is only intended for interactive screen output.
If you are not yet a Promodag Reports user, download it and use it for free for 45 days. Feel free to use our contact form to leave us a comment or to submit a support request.

About the author

Promodag

Our flagship reporting tool, Promodag Reports, is an innovative and constantly improving email reporting product that brings together all the key elements from Office 365, hybrid and on-premise Exchange messaging environments.

Try Promodag Reports Free for 45 Days

Cookie Notice

Find out more about how this website uses cookies to enhance your browsing experience.