I'm looking for a way to retrieve the list of people in a distribution list (contact list) in Outlook.com using the Microsoft Graph API.
So far I was able to retrieve the distribution group name etc.. using
https://graph.microsoft.com/v1.0/me/people?$search=DL_NAME
I'm certain that it's what I'm looking for because the result from API includes the following
"personType": {
"class": "Group",
"subclass": "PersonalDistributionList"
}
This is weird anyways, because it shows up using people
endpoint and not the contacts
.
What I need from this point on is to be able to retrieve the list of people in the distribution list. I've tried querying using the id in the result but it didn't work. Any ideas?
Couple of things...
group
entity in Microsoft Graph, so in your case you should be able to use the id
returned from your people search in the following to get the group/DLs membersGET https://graph.microsoft.com/v1.0/groups/{id}/members
group
entity:GET https://graph.microsoft.com/v1.0/groups?$filter=displayName eq 'DL_NAME'
people
API (see this topic) is really about people that you communicate with most often - and it includes users, groups and contacts.Hope this helps,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With