cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ajennings1
Level: Powered On

Getting MS Teams Current Team in PowerApps

I have a project where PowerApps is ran from a tab in MS Teams. When an admin creates a new project table item in SQL, a new team is created in MS Teams via a Flow. This team will come with its own PowerApp. 

 

One of the screens in the PowerApp is a Project Details screen. For this, I need to know what the current team is called that the current powerapp instance is running from. From there I can have a dynamic powerapp that only lets the current teams members see the Project details they've been assigned to. 

I know already there are MicrosoftTeams methods included in the current PowerApp version, but the closest thing i can get is the GetAllTeams() method. Is there a way of getting the CurrentTeam name so that the PowerApp can filter different Project details?

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Level 10

Re: Getting MS Teams Current Team in PowerApps

Hi @ajennings1 ,

I'm afraid it's not supported to display CurrentTeam name directly currently in PowerApps.

As an alternative way, I suggest you try the GetAllTeams function.

Add a Gallery control to return all teams.

Set the Gallery’s item property as:
MicrosoftTeams.GetAllTeams().value

This function will return all the items under your account.

Then, filter project accoding to the team list.

The app will only display the projects of some specific teams that the user belong to.

 

Here's a doc for your reference:

https://docs.microsoft.com/en-us/connectors/teams/

 

Best regards,

Community Support Team _ Phoebe Liu

 

 

2 REPLIES 2
v-yutliu-msft
Level 10

Re: Getting MS Teams Current Team in PowerApps

Hi @ajennings1 ,

I'm afraid it's not supported to display CurrentTeam name directly currently in PowerApps.

As an alternative way, I suggest you try the GetAllTeams function.

Add a Gallery control to return all teams.

Set the Gallery’s item property as:
MicrosoftTeams.GetAllTeams().value

This function will return all the items under your account.

Then, filter project accoding to the team list.

The app will only display the projects of some specific teams that the user belong to.

 

Here's a doc for your reference:

https://docs.microsoft.com/en-us/connectors/teams/

 

Best regards,

Community Support Team _ Phoebe Liu

 

 

ajennings1
Level: Powered On

Re: Getting MS Teams Current Team in PowerApps

@v-yutliu-msft,

 

Thanks for the response. Yeah i did that before and i think that will be the best method going forward. I just wondered if getting the current team was possible for security purposes but this method should suffice.

 

Thanks.