Which distribution lists does a contact belong to?

Garcia Martin_ Emili 1 Reputation point
2022-04-05T06:31:46.763+00:00

As title says, one of our users wants to know which distribution lists contain a given contact. Is it possible?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,344 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Shivam Dhiman 5,951 Reputation points
    2022-04-05T15:01:59.707+00:00

    Hi @Garcia Martin_ Emili

    You can use this Graph API to get all the distribution list for a given user.

    https://graph.microsoft.com/v1.0/users/{user-id}/memberof  
    

    Reference : This will give you all type of Groups(including distribution lists) where a specific user is part of.
    Please refer to the below example screenshots.
    Distribution list

    190321-outlook1.png

    Result :

    190262-result.png

    Hope this helps.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".

    0 comments No comments

  2. Zehui Yao_MSFT 5,846 Reputation points
    2022-04-06T05:59:11.79+00:00

    Hello @Garcia Martin_ Emili , you can get the groups your user belongs to via the /memebrof endpoint. And get the type from property groupTypes .
    However, currently Graph only support to distinguish Microsoft O365 groups, according to the documentation.
    You can send a uservoice to submit the feature of distinguish other group type.

    190403-image.png
    190451-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments