cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
xecho
Helper I
Helper I

Outlook contact group powerapps

Hi,

 

I want to be able to list the groups in my contact list in Powerapps. 

 

For example I have a group "ABC" with the the following contacts in that group:

1@a.com

2@a.com

etc.

 

When I use Office365Outlook.ContactGetItemsV2() I will get all items in my contact list and have no idea which ones are only in the group "ABC". In the end I want to select only a group and then send an email to all members of that group, rather than selecting all individuals members of that group.

 

Any ideas how to get groups listed within the ContactItems?

 

Thanks,

Bart

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @xecho ,

 

Could you tell me:

Did you have a contact list in outlook? And did you add the list to the contact folder? Did you want to get the contact list in the contact folder?

vxiaochenmsft_0-1628743747918.png

vxiaochenmsft_1-1628743770920.png

 

If so, at my knowldege, there is no api (graph api) to get the contact list and users in it.

 

If you just want to get the users in each contact folder, you could first use Office365Outlook.ContactGetTablesV2() to get the Ids of all folders and then use Office365Outlook.ContactGetItemsV2() to get the users in a folder.

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

 

 

View solution in original post

3 REPLIES 3
v-xiaochen-msft
Community Support
Community Support

Hi @xecho ,

 

Could you tell me:

Did you have a contact list in outlook? And did you add the list to the contact folder? Did you want to get the contact list in the contact folder?

vxiaochenmsft_0-1628743747918.png

vxiaochenmsft_1-1628743770920.png

 

If so, at my knowldege, there is no api (graph api) to get the contact list and users in it.

 

If you just want to get the users in each contact folder, you could first use Office365Outlook.ContactGetTablesV2() to get the Ids of all folders and then use Office365Outlook.ContactGetItemsV2() to get the users in a folder.

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

 

 

StalinPonnusamy
Super User
Super User

Hi @xecho 

 

In This example, getting all the members in the "development" Group

  • Get all Group
  • Get Members for that group

 

 

ClearCollect(
    AllADGroup,
    AddColumns(
        Distinct(
            GroupIDs,
            Value
        ),
        "GroupName",
        AzureAD.GetGroup(Result).displayName
    )
);
Clear(MembersInDevelopmentGroup);
ForAll(
    AllADGroup,
    If(
        GroupName = "Development",
        Collect(
            MembersInDevelopmentGroup,
            Office365Groups.ListGroupMembers(Result).value
        )
    )
);

 

Note: AzureAD and Office365Groups connectors used

Thanks, I will try that.

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (3,777)