This is a quick tip for something that I'm asked quite often. The scenario is that you have created an inbound connector in Exchange Online and want to verify that mail which should be coming in through that connector really is; as opposed to mail coming in through a different custom connector or even the default hidden inbound connector.
The quickest way I’ve found to do this is through PowerShell. First, find a message that was received by Exchange Online. Copy the MessageID from the message and then plug it into the following PowerShell which you’ll need to run against your tenant.
Get-MessageTrace -MessageId "<MessageID>" | Get-MessageTraceDetail -Event Receive | fl
After running the above you should see something like this.
Copying out the Data field, we can see the name of the inbound connector in Exchange Online in which this message was attributed to. Just look for “S:InboundConnectorData.”
<root><MEP Name="ConnectorId" String="SN6PR03MB3709\Default SN6PR03MB3709"/>...'S:InboundConnectorData=Name=Work office to ExO;
I can quickly see that this particular message came into my tenant through my connector named “Work office to ExO.” If you do not see “S:InboundConnectorData,” then the message came in through the default hidden inbound connector.