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,