The scenario
In our scenario we have:
- a manager mailbox (manager@xxx.yyy)
- many resource mailboxes (resource_a@xxx.yyy, resource_b@xxx.yyy...)
Resource mailboxes are setup so that their meeting requests are forwarded to the manager mailbox. The manager will accept or decline on behalf of the resource.
Our python script connects to the manager account using exchangelib, get the meeting requests and is supposed to accept or to decline depending on rules that are resource specific.
The problem
Our problem is that we can't find a way to know which resource is a MeetingRequest related to.
What we have tried so far
The to_recipients
field's value is manager@xxx.yyy
so it doesn't help.
The author
and sender
fields' values are the mailbox which has created the original meeting so it doesn't help either.
We can't rely upon required_attendees
or optional_attendees
for 2 reasons:
- There always are peoples' email addresses in the attendees in addition to the resource and our script can't differentiate a resource email address from other email addresses.
- There can be more than one resource for the same meeting. In such a case there will be a meeting request for each resource, each with all the resources in the attendees.
According to MS doc MeetingRequest
should have a ReceivedRepresenting
field which seems to be exactly what we need. Unfortunately it is not present in the exchangelib MeetingRequest
object although it is in the XML response from EWS when getting the meeting request (we can see it by unabling exchangelib debug logging).
<t:ReceivedRepresenting>
<t:Mailbox>
<t:Name>Resource A</t:Name>
<t:EmailAddress>resource_a@xxx.yyy</t:EmailAddress>
<t:RoutingType>SMTP</t:RoutingType>
<t:MailboxType>Mailbox</t:MailboxType>
</t:Mailbox>
</t:ReceivedRepresenting>
Any idea?
Any idea on how to solve this?