cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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.

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.

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
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (7,230)