cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Getting AzureAD groups in a Dropdown list

i am trying to get the Azure AD groups in a dropdown list but the function required parameter is "group id" why can not why group name, i was struggling to load all AAD groups in the Dropdown using Group name

i am using office365groups and Azure connector..

in my app i have filled the dropdown list with Group object id manually in item filed, and got the list of users from the Group

is there anyway i can get the Group with its Name?? .. 

Rabbanisyed_0-1606066847762.png

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Power Participant
Power Participant
Highlighted
Resolver I
Resolver I

By Mistake I press accept as solution.. it incorrect

It retrives only the current logged in user where my question is ALL Groups 

View solution in original post

5 REPLIES 5
Highlighted
Power Participant
Power Participant
Highlighted
Resolver I
Resolver I

By Mistake I press accept as solution.. it incorrect

It retrives only the current logged in user where my question is ALL Groups 

View solution in original post

Highlighted

i have already seen this link but it fetch only the current logged in user Groups.. my questions is about all m365 or AD groups. so this is not the soultion

 

Highlighted
Microsoft
Microsoft

Hi @Rabbanisyed,

 

Could you tell me:

Do you want to display all AAD groups in the dropdown control and show the group name?

 

If so , The key is to use a custom connector. Because the built-in connector cannot meet your needs.

 

I've made a test for your reference:

1\ Go to this website (https://portal.azure.com) and register an app.( Please follow the steps below)

  1. Go to Azure Active Directory and register an app.
  2. Set Redirect URL : https://global.consent.azure-apim.net/redirect
  3. After the registration ,copy Client ID.
  4. Set API permissions, choose Microsoft Graph delegated permissions

145.PNG

     5.  Choose Certificates & secrets and create Client secrets, copy the Value( not the ID ) .

 

2\ Create a custom connector from blank (Please follow the steps below)

  1.   Set Host:  graph.microsoft.com

146.PNG

/* Client id: Copied client id

  Client secret :Copied value

 Resource URL: https://graph.microsoft.com  */

    2.    Set request Verb :Get .Set requests URL: https://graph.microsoft.com/v1.0/groups

    3.    Set Responses body to:

{

  "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups",

  "value": [

    {

     

            "id": "String",

            "deletedDateTime": "String",

            "createdDateTime": "String",

            "description": "String",

            "displayName": "String",

            "mail": "String",

            "mailEnabled": false,

            "onPremisesLastSyncDateTime": "String",

            "onPremisesSyncEnabled": true,

            "securityEnabled": true,

            "visibility": true

    }

  ]

}

     4.    Create the connector

 

3\ Create an app and a connection to test.

Add a dropdown control to screen and set its Items property to:

BBB.TEST().value                 // BBB is the name of my custom connector .TEST is my operation ID.

 

Set the dropdowns value property to :

displayName

 

4\ The result is as follows:

147.PNG

If you want to create a custom connector within your PowerApps using OAuth 2.0 authentication, please check the following article for more details:

https://docs.microsoft.com/en-us/connectors/custom-connectors/azure-active-directory-authentication

 

Best Regards,

Wearsky

Highlighted
Resolver I
Resolver I

i do not see point no 5:

Choose Certificates & secrets and create Client secrets, copy the Value( not the ID ) .

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (13,089)