cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WorkHard
Helper III
Helper III

Get a list of emails from an AD Group and populate a sharepoint list dropdown

In a sharepoint list, is it possible to populate a dropdown list with users/emails from a specific group from AD?

I'm assuming this is not possible in the vanilla form editor but if I build a Power App form for this list how would I go about automatically pulling the user/email in a dropdown list?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-albai-msft
Community Support
Community Support

Hi @WorkHard ,

Do you mean Azure AD group? 

If yes, two ways you can try to get all the members from a particular group.

1. You can use Azure AD connector. Add a dropdown control and set its Items property to below formula:

AzureAD.GetGroupMembers("cdd2bc5c-a5ac-4516-8ab9-740a2b8974a2").value.mail

v-albai-msft_0-1622442702801.png

If you want to show all the user name, you can use:

AzureAD.GetGroupMembers("cdd2bc5c-a5ac-4516-8ab9-740a2b8974a2").value.displayName

2. You can also use Office365Groups connector. Add a dropdown control and set its Items property to below formula:

 

Office365Groups.ListGroupMembers("cdd2bc5c-a5ac-4516-8ab9-740a2b8974a2").value.mail

If you want to show all the user name, you can use:

Office365Groups.ListGroupMembers("cdd2bc5c-a5ac-4516-8ab9-740a2b8974a2").value.displayName

v-albai-msft_1-1622442850722.png

Notes:

1. Add the Azure AD connector or Office365Groups connector first.

2. Replace to your group ID. You can get the group ID from below "Object Id" property:

v-albai-msft_3-1622442967736.png

 

 

Best regards,

Allen

 

View solution in original post

4 REPLIES 4
C-Papa
Solution Supplier
Solution Supplier

If you create a form from a SharePoint list that has a person choice field it will allow you to search all users in the organisation base on email / first and second name. you don't need to create a list of users within SharePoint as PowerApps can use the active directory. 

Yes, I'm aware of that. But the goal is to only have the ability to select a specific group of employees and all of them should be visible in the dropdown (without searching for their name).

C-Papa
Solution Supplier
Solution Supplier

Ok, so you could collect the users from the Office365.users connector into a collection and filter the users based on your requirements, this assumes that one of the fields in the active directory contains the information you would like to filter against. you then set you items property of your dropdown to your collection column that you want to display. If you cannot filter people from AD using the existing fields you would need to either add them when creating the collection or store the groups in a database somewhere. 

v-albai-msft
Community Support
Community Support

Hi @WorkHard ,

Do you mean Azure AD group? 

If yes, two ways you can try to get all the members from a particular group.

1. You can use Azure AD connector. Add a dropdown control and set its Items property to below formula:

AzureAD.GetGroupMembers("cdd2bc5c-a5ac-4516-8ab9-740a2b8974a2").value.mail

v-albai-msft_0-1622442702801.png

If you want to show all the user name, you can use:

AzureAD.GetGroupMembers("cdd2bc5c-a5ac-4516-8ab9-740a2b8974a2").value.displayName

2. You can also use Office365Groups connector. Add a dropdown control and set its Items property to below formula:

 

Office365Groups.ListGroupMembers("cdd2bc5c-a5ac-4516-8ab9-740a2b8974a2").value.mail

If you want to show all the user name, you can use:

Office365Groups.ListGroupMembers("cdd2bc5c-a5ac-4516-8ab9-740a2b8974a2").value.displayName

v-albai-msft_1-1622442850722.png

Notes:

1. Add the Azure AD connector or Office365Groups connector first.

2. Replace to your group ID. You can get the group ID from below "Object Id" property:

v-albai-msft_3-1622442967736.png

 

 

Best regards,

Allen

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,194)