I am trying to get all the distribution lists owned by a particular user
I made a call
v1.0/users/{upn}/ownedObjects
Then took the results based on MS info stating that a DL is when MailEnabled is true and SecurityEnabled is false
then since we were trying to exclude (by business request) to remove any with a groupType of "Unified"
and we aren't getting the data we are expecting. It does not look like the DL info is coming it by the ownedObjects call.
I don't need to know who is in the Lists (groups), I need to know for a given user their list of Distribution Lists using MS Graph API. Any help would be wonderful.
Use case.
User goes to screen.
User is presented with list of the distribution lists that they own
Further details (from MS documentations)
Group types in Azure AD and Microsoft Graph
Azure AD supports the following types of groups.
Microsoft 365 groups
Security groups
Mail-enabled security groups
Distribution groups
For more information about Azure AD groups, see compare groups in Azure AD.
In Microsoft Graph, the type of group can be identified by the settings of its groupType, mailEnabled, and securityEnabled properties
I want to be able to pull the Distribution Groups owned by a given user on demand
The only option we see right now is to pull all the groups in AD down then find each group's owner individually and store this info in a db table. The length of time would make it only worth running off hours and 99.999% of the data wouldn't change but in this model we would have to check each one.
Thank you.