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

Re: Import a List of users from Azure AD Group

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

Re: Import a List of users from Azure AD Group

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

Re: Import a List of users from Azure AD Group

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

JamesOxton Helper II
Helper II

Re: Import a List of users from Azure AD Group

perfect exactly what I was looking at...

jcollins Advocate II
Advocate II

Re: Import a List of users from Azure AD Group

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

Re: Import a List of users from Azure AD Group

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.

Highlighted
AveDog08 Helper II
Helper II

Re: Import a List of users from Azure AD Group

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (6,654)