Error Adding User to Shared Team Channel via Microsoft.Graph.Teams PowerShell Module

Cooper, Brian D 0 Reputation points
2025-08-27T15:15:07.8966667+00:00

Recently, our existing GraphAPI Powershell automation (Microsoft.Graph.Teams v1.0) that we use for creating shared team channels and setting up user permissions has stopped working with the following error:

New-MgTeamChannelMember: Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.

Our tenant is in GovCloud not Commercial.

I have tried executing this with the email address instead of userId also. I have also attempted using the beta version of the module following the same example pattern for the beta version.

The working code (redacted identifiables) is below.

$params2 = @{

"@odata.type" = "#microsoft.graph.aadUserConversationMember"

roles = @("owner"

)

"******@odata.bind" = "https://graph.microsoft.com/beta/users/18ffc9af-******-e577a2954715"

}

New-MgTeamChannelMember -ChannelId "19:Ufg5H1DymvEg471**************laoY1@thread.tacv2" -TeamId "665358ae-*********-d7df35666ca2" -BodyParameter $params2

Does anyone know what this error means or can see anything wrong with our logic? This parameter set is identical to the Example 4: Add a user who is part of the same tenant as a member to a shared channelon the documentation site. (https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.teams/new-mgteamchannelmember?view=graph-powershell-1.0)

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Domic Vo 1,015 Reputation points Independent Advisor
    2025-08-27T15:59:17.9533333+00:00

    Dear Cooper, Brian D,

    The error message you're seeing—“Parameter set cannot be resolved using the specified named parameters”—typically indicates a mismatch between the cmdlet’s expected input and the parameters provided. While your code aligns with documented examples for commercial tenants, it's important to note that Microsoft Graph endpoints and capabilities may differ in GovCloud environments, including support for certain beta features and object bindings.

    In your script, the use of "@odata.bind" referencing https://graph.microsoft.com/beta/users/... may not be fully compatible with GovCloud, which uses a different endpoint (https://graph.microsoft.us). We recommend updating the binding URL to reflect the GovCloud endpoint and verifying that the user object exists and is accessible within that scope.

    Additionally, ensure that:

    You are using the latest version of the Microsoft.Graph.Teams module compatible with GovCloud.

    The required permissions (e.g., ChannelMember.ReadWrite.All) are granted and consented in your Azure AD Gov tenant.

    The BodyParameter object is constructed using the correct schema for GovCloud, which may differ slightly from commercial examples.

    If the issue persists, we suggest testing the request using Microsoft Graph Explorer for GovCloud or reviewing the GitHub discussion on similar errors, where other users have encountered parameter resolution issues with this cmdlet.

    I hope this helps. Just kindly tick Accept Answer that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    Best regards,

    Domic Vo


  2. NK Realtors 0 Reputation points
    2025-08-27T17:33:58.88+00:00

    It seems this issue occurs when adding users to a shared team channel via Microsoft Graph API if the external or guest access settings are not properly configured. A few points you can check:

    1. External/Guest Access: Ensure that Teams external access and guest access are enabled in the Teams Admin Centre and Azure AD.

    Licensing: Verify that the users you are trying to add have the correct licensing. Guest users should have access enabled, and licensed users must have Teams/Exchange Online properly assigned.

    Channel Type: Shared channels have stricter limitations compared to standard/private channels. Confirm that the Graph API call matches the shared channel requirements and permissions.

    Graph API Permissions: Check if your app registration in Azure has the required Graph API permissions (such as ChannelMember.ReadWrite.All). After updating permissions, make sure admin consent is granted.

    1. Policy Restrictions: Review the Teams policies applied to the users. Sometimes, custom policies restrict adding users to shared channels.

    Propagation Delay: After updating access/permissions, changes may take some time to propagate across Microsoft 365 services. Wait and try again after a few hours.

    If the problem persists, try testing the same API request with a global admin account to confirm if it’s a permission-related issue.

    Hope this helps!

    Regards, NK Realtors

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.