cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JamesOxton
Helper II
Helper II

Import a List of users from Azure AD Group

Hi there,

 

Is it possible to import users from a group that is in Azure AD?  I need to pull in a list of users for a powerapp that can then be assigned to cases within the powerapp itself.  

 

Is this possible and whats the best way?

 

Many Thanks for any help!

1 ACCEPTED SOLUTION

Accepted Solutions
v-micsh-msft
Community Support
Community Support

Hi @JamesOxton,

 

You could take use of the following function to get the group members in PowerApps:

AzureAD.GetGroupMembers("GroupId").value

This function would return a table of the available users within the same Azure AD group.

The formula above could be put into the items property of a dropdown, then you could take use of the Dropdown selected value to save the value needed.

For example, Dropdown.selected.value.

51.PNG

For downdown control, please check:

Dropdown control in PowerApps

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Take a look at Office365Users() conenctor.

 

It connects to AD and you can see all the properties of an user if you have his ID or Email

 

https://powerapps.microsoft.com/en-us/tutorials/connection-office365-users/

 

You could have a field where users enter email and click verify which would have OnSelect property of:

UpdateContext(
  {
    _SelectedUser : Office365Users.UserProfile(TextInput.Text)
  }
)

Then you can use any user information available in your AD.

v-micsh-msft
Community Support
Community Support

Hi @JamesOxton,

 

You could take use of the following function to get the group members in PowerApps:

AzureAD.GetGroupMembers("GroupId").value

This function would return a table of the available users within the same Azure AD group.

The formula above could be put into the items property of a dropdown, then you could take use of the Dropdown selected value to save the value needed.

For example, Dropdown.selected.value.

51.PNG

For downdown control, please check:

Dropdown control in PowerApps

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

perfect exactly what I was looking at...

Darn, i really thought this would be the solution for a much needed form. I only want to display the names of a specifc group so the user can't select just any random person. Using this Azure formula is great but it requires everyone to be an Admin.  Have you found a simlar solution that works with Office265users? 

thanks, Joe.

shilpaMInfomaze
New Member

Hi James,

 

Add Office365users connector to your app and add the following code into items property of dropdown list. It'll show you top 1000 Azure AD users display name in your app dropdown list.

 

Office365Users.SearchUser({searchTerm:"",top:100}).DisplayName

 

Thank you.

The problem is the AzureAD.GetGroupmembers() function is limited to 100 items so is the Office365Groups.ListGroupMembers() function


@v-micsh-msft wrote:

Hi @JamesOxton,

 

You could take use of the following function to get the group members in PowerApps:

AzureAD.GetGroupMembers("GroupId").value

This function would return a table of the available users within the same Azure AD group.

The formula above could be put into the items property of a dropdown, then you could take use of the Dropdown selected value to save the value needed.

For example, Dropdown.selected.value.

51.PNG

For downdown control, please check:

Dropdown control in PowerApps

 

Regards,

Michael


 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (1,541)