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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Remove a member from T...
Power Automate
Suggested Answer

Remove a member from Teams team/channel from Power Apps Flow

(0) ShareShare
ReportReport
Posted on by
Hi,
 
I am trying to remove a user from Teams channel/team by removing it from the app on Power Apps using automate flow.
I am using get profile (v2) to get the membership id of the user by passing its email. 
Still it gives me error :
{
  "error": {
    "code""BadRequest",
    "message""Invalid membership id provided: '799827b9-e7cf-4727-b58d-83b4a42a9381'",
    "innerError": {
      "date""2026-03-30T21:52:54",
      "request-id""a841b286-da8d-43d1-a959-2d8c574409e8",
      "client-request-id""a841b286-da8d-43d1-a959-2d8c574409e8"
    }
  }
Categories:
I have the same question (0)
  • Suggested answer
    Sunil Kumar Pashikanti Profile Picture
    2,095 Moderator on at
     
    In Microsoft Teams, membership ID ≠ user (Azure AD) ID.
    Power Automate and Microsoft Graph require the conversationMemberId, which is unique to the team or channel, not the user profile ID returned by Get Profile (V2).
     
    Try this Approach
    List members of the Team or Channel
         Use List team members or
         Call Graph API:
              GET /teams/{team-id}/members
    Filter the result by user email or UPN.
    Extract the id field from the filtered result
         This is the conversationMemberId.
    Remove the member
         Power Automate action or
         Graph API:
              DELETE /teams/{team-id}/members/{conversationMemberId}
     
    This resolves the “Invalid membership id” error completely, because Microsoft Teams only accepts conversation‑scoped membership IDs, not Azure AD user IDs.
     
    References:
     
     
    ✅ If this answer helped resolve your issue, please mark it as Accepted so it can help others with the same problem.
    👍 Feel free to Like the post if you found it useful.
  • Suggested answer
    Harish Mogulluri Profile Picture
    10 on at
     
     
     

    From Power Apps, you can pass the user’s email address or UPN (userPrincipalName) to the Power Automate flow as an input parameter.

     

    Once the flow receives this input, you can use the email address (UPN) along with the required details such as the Team ID and Channel ID. Using these values, you can call the  Microsoft teams connector (Action:  Remove a direct member from a channel )in Power Automate.
    Remove a direct member channel  have drop down value  to select team id and channel id.

    Alternatively you can use Graph API to do the same 


     If this answer resolved your issue, please mark it as verified — it helps others too!
    👍 If it was helpful but didn’t fully solve it, a like would be greatly appreciated.
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 816

#2
Valantis Profile Picture

Valantis 603

#3
Haque Profile Picture

Haque 566

Last 30 days Overall leaderboard