web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : UAOXXcUkxkBnBa2a93giy6
Power Apps - Building Power Apps
Answered

Get MS Teams Group ID

Like (0) ShareShare
ReportReport
Posted on 18 Mar 2019 16:20:58 by 347

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?

Categories:
  • marcospfa Profile Picture
    24 on 28 Dec 2023 at 20:39:08
    Re: Get MS Teams Group ID

    Hello everyone! I'm facing a similar issue. I've created an app that handles registrations for meeting topics. The user enters the topic, the time they'll allocate for presenting during the meeting, and attaches a file for their presentation. Upon clicking the "send" button, the data gets saved in a gallery, the file is sent to SharePoint, and simultaneously to a channel in Teams. However, every time I start the app, I receive an error message:

    "microsoftteams.getchannelsforgroup failed: The "getchannelsforgroup" function has an invalid value for the "groupId" parameter - a blank value was passed where it wasn't expected. Please check if a valid argument was passed to the function."

    This image is where the user registers the topic. They need to select the team and channel for the file to be sent to the folder in the channel. I would like to make this dynamic, but I couldn't figure it out. If anyone knows how to help me with this, I will be very happy and grateful. For sending the file to Teams, I created a flow.

     

    The codes I used to connect to Teams are these: MicrosoftTeams.GetAllTeams().value to retrieve all user teams, and this one to get all channels from the teams MicrosoftTeams.GetChannelsForGroup(drp_teams.Selected.id).value. I used these codes in both yellow-highlighted dropdowns in the image!

     

    And to execute, I placed the following code in the 'OnSelect' option of the send button:

    ForAll(DataCardValue11.Attachments As Arquivo;
    Anexos_Enviados.Run({contentBytes:Arquivo.Value; name: Arquivo.Name}));;

    Any ideas on how I can solve this problem?

     

     

     

    marcospfa_0-1703795491223.png

     



    I appreciate your help in advance!

  • hawi2222 Profile Picture
    2 on 23 May 2020 at 15:17:43
    Re: Get MS Teams Group ID

    Hello ebrerybody,

     

    sorry, but I didn't understand the solution. I'm working with

    wrong --> LookUp(MicrosoftTeams.GetAllTeams().value, 'displayName' = Dropdown4.Selected.displayName).id


    This is the solution - in my opinion is exactly like my example:
    website --> Lookup(MicrosoftTeams.GetAllTeams().value, 'displayName' = DataCardValue9.Selected.displayName).id

    Is there any condition to the dropdown field? It's not a member of a gallery and standing alone.

    Thanks to all guys.

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 18 Mar 2019 at 20:40:11
    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.

  • hnguy71 Profile Picture
    347 on 18 Mar 2019 at 20:21:00
    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!

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 18 Mar 2019 at 19:38:39
    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.

  • hnguy71 Profile Picture
    347 on 18 Mar 2019 at 18:27:30
    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?

  • Verified answer
    RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 18 Mar 2019 at 16:42:52
    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.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete