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

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

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

 

 

Community Support Team _ Phoebe Liu
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

3 REPLIES 3
v-yutliu-msft
Community Support
Community Support

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

 

 

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

@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.

Is it possible to modify url that is used by MS Teams to call the app? If yes, parameter can be added so that powerapp is aware of where it was called from.

 

I found the information about configurable tabs, but I can not find  information of how to create a manifest.json for my app (or should I even create a manifest.json if all I need is to add a parameter to URL, so called "deep linking").



 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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