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

Get MS Teams Group ID

Hi All.

 

I'm trying to retrieve and display an MS Teams' group ID. In a dropdown box, I'm retrieving the display name of the team via:

 

MicrosoftTeams.GetAllTeams().value.displayName

 

That part works and I'm able to see the teams that I'm a part of. The second part is where I'm having trouble with. I want to be able to show the group ID of the selected display name. I'm trying this right now but it's currently giving me an error stating: "The property expects Text values, but this rule produces incompatible Table values."


Filter(MicrosoftTeams.GetAllTeams().value.id, 'Team Name' = DataCardValue9.Selected.displayName)

Any ideas on how to fix this?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Get MS Teams Group ID

@hnguy71 

MicrosoftTeams.GetAllTeams().value is a table of Teams.

Each record in the value table will have a description, displayName, and id

 

There is no 'Team Name' column.  So your filter will not work.

You could change it to this:

 

Lookup(MicrosoftTeams.GetAllTeams().value, 'displayName' = DataCardValue9.Selected.displayName).id

 

I hope that gets you further.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

5 REPLIES 5
Super User
Super User

Re: Get MS Teams Group ID

@hnguy71 

MicrosoftTeams.GetAllTeams().value is a table of Teams.

Each record in the value table will have a description, displayName, and id

 

There is no 'Team Name' column.  So your filter will not work.

You could change it to this:

 

Lookup(MicrosoftTeams.GetAllTeams().value, 'displayName' = DataCardValue9.Selected.displayName).id

 

I hope that gets you further.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

hnguy71
Level 8

Re: Get MS Teams Group ID

Ahhh makes sense!

 

Thanks for the help! Side question: is it possible to obtain the weburl of the Group ID?

Super User
Super User

Re: Get MS Teams Group ID

@hnguy71 

There are a couple of "hacks" around to do that.  

This message mentions some options for getting to the URL from Teams.  From that URL you can see there is the GroupID, but then you also need to know the TenantID and a couple other things.

Worth taking a look at.  And also, this is assuming Web Browser for launch.  If you want to launch direct to the teams app, you can take a look at this recent message that talks about that...still no idea how to go to a specific group.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
hnguy71
Level 8

Re: Get MS Teams Group ID

I can harvest the tenant id, client id, group id from Teams link but that doesn't give me the SharePoint weburl that I need. Also, if i paste it into the browser it will redirect me to either the web app or the desktop app.

 

I can harvest the weburl vis Microsoft Graph API but that requires additional authentication. I was being hopeful that I did not have to go down that route but seems like I will have to.

 

Thanks for the info!

Super User
Super User

Re: Get MS Teams Group ID

@hnguy71 

Ah, the SharePoint site is what you're looking for...

Yep, not an easy one.  There is an article here that might be helpful to you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 452 members 6,370 guests
Recent signins:
Please welcome our newest community members: