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 : ouxnOL0/UdYebd3pyGgzGR
Power Apps - Building Power Apps
Answered

How to filter current user not belong to microsoft teams group men=mber

Like (0) ShareShare
ReportReport
Posted on 16 Jan 2020 02:16:54 by 155

Hi,

 

I am using microsoft teams in Powerapps application, able to use GetAllTeams().value, it will show all teams groups you are a member of.

Now I want to filter all teams that current user are not a member of, any advise? thanks.

 

Regards

Steven

I have the same question (0)
  • Verified answer
    StevenZhang Profile Picture
    155 on 17 Jan 2020 at 02:48:10
    Re: How to filter current user not belong to microsoft teams group men=mber

    Thank you.

    I tried to use collect,

    Collect(OtherTeamKRs,Filter('Team Objective',Not(Left(Team.DisplayName,Len(Team.DisplayName)-8) in MicrosoftTeams.GetAllTeams().value.displayName)))
    then use filter in gallery, it is working for me.
  • Verified answer
    v-xida-msft Profile Picture
    on 17 Jan 2020 at 02:41:23
    Re: How to filter current user not belong to microsoft teams group men=mber

    Hi @StevenZhang ,

    Do you want to show all teams group you are not a member of using Microsoft Teams Connector?

     

    If you want to show all teams group you are not a member of using Microsoft Teams Connector, I afraid that there is no way to achieve your needs in PowerApps currently.

     

    The MicrosoftTeams.GetAllTeams(...) function is used to get all teams you are a member of rather than all teams in your Tenant. As an alternative solution, I think the custom connector could achieve your needs.

     

    On your side, you could consider create a custom connector in PowerApps bases on Microsoft Graph REST API. Then define proper List all teams operation within it:

    GET /groups?$select=id,resourceProvisioningOptions

    then save your custom connector and publish it, then you could use it in your app.

     

    Then within your app, add a Gallery control, set the Items property to following:

    Filter(
     Filter('CustomConnector'.ListAllTeams().value,"Team" in resourceProvisioningOptions.Value),
     Not(id in MicrosoftTeams.GetAllTeams().value.id)
    )

    Note: The 'CustomConnector' represents the name of your custom connector.

     

    More details about creating a custom connector in PowerApps based on Microsoft Graph API, please refer to the following blog:

    https://gotoguy.blog/2017/12/17/access-microsoft-graph-api-using-custom-connector-in-powerapps-and-flows/

     

    Best regards,

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 885 Most Valuable Professional

#2
developerAJ Profile Picture

developerAJ 571

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 352 Super User 2025 Season 2

Last 30 days Overall leaderboard