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

Creating a custom connector with Azure Function

Hey there,

 

I need to retrieve all groups defined in in my Org via executing the 'List Groups' action. Then based on the retrieved groups ids, execute the 'List Owners' action, check if the returned Owners list of a specific group contains yourself. If true, the collect the corresponding group into a Collection (using Collect function). I have spent hours trying to figure out how to do this, but I cannot find a tutorial or anything to help. Can someone point me in the right direction?

 

Thank you,

Zach.

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Creating a custom connector with Azure Function

Hi @zdieter ,

Have you defined a Custom connector within your PowerApps already?

Do you want to check if yourself is included within the owner list of a specific group?

 

I assume that you have defined a Custom connector within your PowerApps already, if you want to achieve your needs, I think the ForAll function could achieve your needs.

 

I have made a test on my side, please consider take a try with the following workaround:

Add a button control in your app, set the OnSelect property to following:

Clear(GroupCollection);
ForAll(
       RenameColumns('CustomConnectorName'.ListGroups().value, "displayName", "displayName1", "id", "id1", "mail", "mail1"),
       If(
          User().Email in 'CustomConnectorName'.ListOwners(id1).value.mail, // Check if yourself is included in the returned Owner list
          Collect(
                  GroupCollection,
                  {
                     GroupName: displayName1,
                     GroupId: id1,
                     GroupEmail: mail1
                  }
          )
       )
)

Note: Within above solution, I only contain displayName, id, mail property values from returned group list into the GroupCollection, on your side, you could include more properties within the GroupCollection.

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

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

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (5,927)