cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
PhilD
Level 8

Get list of Office 365 Groups

I know I can use Office365Groups.ListOwnedGroups().value to return a list of groups that I own but when the app is published, this function returns those groups for the user running the app. Is there a way to control the context and return the same list for everyone? Something along the lines of Office365Groups.ListOwnedGroups("example@microsoft.com").value

 

For example, in our organization there are many teams using Office 365 Groups. We would like to use PowerApps to collect ideas, route, prioritize and otherwise manage and assign them. I was thinking that it would be great instead of having the item forms be populated with a static list of these teams,  we could pull down a live list of O365 Groups to associate an idea/project with a team/O365 Group. Obviously this would have huge implications and advantages like notifying all group members when an item in PowerApps is assigned to the group, etc.

 

Is something like this possible? 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Get list of Office 365 Groups

Hi,
I think the best option is to use the GraphAPI.
If the users of your PowerApps are global tenant admin (which I doubt) you can build a PowerApps custom connector using an AzureApp OAuth authentication to call the GraphAPI and get the groups.
If you want every user using your app capable of fetching the company groups, you must use Application Permission on your AzureApp and this can only work with Flow.

To summarize :
I would call the GraphAPI in Flow to get all the groups and returning them to PowerApps.

Few usefull links :
https://gotoguy.blog/2017/12/17/access-microsoft-graph-api-using-custom-connector-in-powerapps-and-f...
(Don't forget to use Application Permission in your AzureApp)
https://youtu.be/MoifwDFKSTo

Théo

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Get list of Office 365 Groups

Hi,
I think the best option is to use the GraphAPI.
If the users of your PowerApps are global tenant admin (which I doubt) you can build a PowerApps custom connector using an AzureApp OAuth authentication to call the GraphAPI and get the groups.
If you want every user using your app capable of fetching the company groups, you must use Application Permission on your AzureApp and this can only work with Flow.

To summarize :
I would call the GraphAPI in Flow to get all the groups and returning them to PowerApps.

Few usefull links :
https://gotoguy.blog/2017/12/17/access-microsoft-graph-api-using-custom-connector-in-powerapps-and-f...
(Don't forget to use Application Permission in your AzureApp)
https://youtu.be/MoifwDFKSTo

Théo

View solution in original post

phildetwei
Level: Powered On

Re: Get list of Office 365 Groups

Thanks for this information.

 

I will have to try to get someone with tenant admin access to set that up. This is definitely what I need, just wish it were simpler to achieve.

PhilD
Level 8

Re: Get list of Office 365 Groups

@phildetwei is me... no way to delete this account and it logged me in automatically based on my work login and I didn't notice. As far as I can tell, there is no way to delete an account or I would delete @phildetwei

Super User
Super User

Re: Get list of Office 365 Groups

Well, fetching all the company's Office365 Groups is not a small thing. You want your users to see thing that they should not. This is why, somewhere, you have to give them the autorisation to fetch all the company's groups and using an AzureApp Application Permission is the way to do this.

 

Théo

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,779)