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
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

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (63,368)