Reputation: 1
I'm trying to get the distribution list of people/members inside the Outlook add-in.
That distribution/contact list is not the "group" as it was created inside the "Outlook People" section using the option to create "New contact list" as described on the image below:
I can see that list is created and listed at "Your contact lists" like on the following image:
And it can be added as the recipient in the mail as can be seen on the next image:
But I couldn't find a proper API for getting that data neither using the OfficeJS nor the Graph API. I saw some suggestions to fetch the "groups" using the Graph API endpoint: https://graph.microsoft.com/v1.0/groups
, but once again, this is only a (distribution) list of contacts, not a group.
I'd appreciate it if someone from the MSFT team has a suggestion on how to solve this by providing a solution for getting 3 things:
Thanks 😊
Upvotes: 0
Views: 1496
Reputation: 21
We used graph api GET /groups/{id}/members endpoint.
We added below permissions:
Upvotes: 0
Reputation: 53
I up your question as I'm also looking for the answer to your question, unfortunately I do not have enough reputation to increase the up value. Not sure if you have come to a solution?
I understand that you mentioned that the 'groups' here does not imply 'Memberships' in Outlook. Just wondering if you have tested the API and come to this conclusion? I tried this Graph Explorer, however I have permission issues so I could not verify.
Get the members of a specific contact list
https://learn.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&tabs=http
Get the list of distribution/contact lists
https://learn.microsoft.com/en-us/graph/api/user-list-memberof?view=graph-rest-1.0&tabs=http
If 'distribution list' is 'contacts' under contacts folder as suggested by MSFT, will the following API work?
https://learn.microsoft.com/en-us/graph/api/user-list-contacts?view=graph-rest-1.0&tabs=http
Thanks!
Upvotes: 0