I am developing on an outlook add-in, and I need to read the list of recipients when composing an email message. Office-js works great for any recipient that isn't part of a contact group or distribution list.
When using the Office Recipients interface, I can see the contact group's email message with a recipientType of "distributionList", but I'm struggling to find the actual recipients that belong to the group.
What Is the best approach to get all of the recipients that belong to a contact group?
It seems like Office-js does not have any method per their documentation. It might work with the ExpandDl EWS operation, but I was curious if this is the best approach or not.
The only API support there is for Contact Groups (or Personal Distribution list) would be ExpandDL if your using onPrem Exchange then that is the best option, for Office365 it's going away in the future https://techcommunity.microsoft.com/t5/exchange-team-blog/retirement-of-exchange-web-services-in-exchange-online/ba-p/3924440 but there is no alternate methods in the Graph at the moment so it maybe something you can use as an interim. You can decode the singlevalueextendedproperties that contains the list of addresses for a contact group but its probably something you don't want to do due to its complexity and lack of support.