Does Graph API support dynamic distribution lists ?

RustleLaws 21 Reputation points
2021-04-29T08:34:16.86+00:00

Does Graph API support DDLs ?
I tried using groups in URI with beta and V1.0 but it only retrieves the DLs and M365 unified groups

https://graph.microsoft.com/v1.0/groups

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

2 answers

Sort by: Most helpful
  1. Vasil Michev 105.8K Reputation points MVP
    2021-04-29T10:51:32.157+00:00

    No, it does not. Dynamic DLs are Exchange objects, and the Graph currently has limited (zero) support for Exchange admin tasks. Use PowerShell instead.


  2. Prakash Tandukar 1 Reputation point
    2021-05-22T08:54:34.477+00:00

    Hi @Vasil Michev

    As it takes ~50 seconds to fetch a list of Dynamic DL from c# using PowerShell script and our client cannot wait for that long period, we are thinking of the following alternative way to support Dynamic DL in our application.

    Alternative way: instead of showing the list just add a text box to allow to enter Dynamic DL email from the client on the Page. To validate if that is the valid Dynamic DL or not, we can do the following two checks:

    1. Use EWS ExpandGroup to see if that group has any members
    2. Make the following Graph API call to search group by its email address
    3. https://graph.microsoft.com/v1.0/groups?$filter=mail eq 'ddl-test-group@test .onmicrosoft.com'

    If we get any user members from EWS ExpandGroup and we do not get any result from that Graph API call "Group search" - then I think, we can confirm that it is a valid Dynamic DL.

    Once we confirm, later on, we can pull the members ( users) of that Dynamic DL whenever we need it at our application.

    Would appreciate it very much if there is any potential risk to implement it.

    Thanks,
    Prakash

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.