Bad Gateway when adding certain users to channel

%3CLINGO-SUB%20id%3D%22lingo-sub-1662225%22%20slang%3D%22en-US%22%3EBad%20Gateway%20when%20adding%20certain%20users%20to%20channel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1662225%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20very%20interesting%20problem%20where%20i%20get%20a%20502%20Bad%20Gateway%20error%20when%20adding%20certain%20users%20to%20a%20team%20or%20channel%20via%20the%20graph%20API.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fteam-post-members%3Fview%3Dgraph-rest-beta%26amp%3Btabs%3Dhttp%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fteam-post-members%3Fview%3Dgraph-rest-beta%26amp%3Btabs%3Dhttp%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fconversationmember-add%3Fview%3Dgraph-rest-beta%26amp%3Btabs%3Dhttp%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fconversationmember-add%3Fview%3Dgraph-rest-beta%26amp%3Btabs%3Dhttp%3C%2FA%3E%3C%2FP%3E%3CP%3EBoth%20fail%20for%20these%20users.%20The%20users%20are%20always%20the%20same.%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20use%20the%20group%20to%20add%20a%20member%20to%20the%20team%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fgroup-post-members%3Fview%3Dgraph-rest-beta%26amp%3Btabs%3Dhttp%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fgroup-post-members%3Fview%3Dgraph-rest-beta%26amp%3Btabs%3Dhttp%3C%2FA%3E%3C%2FP%3E%3CP%3Eit%20works%20for%20these%20users.%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20as%20far%20as%20i%20know%20there%20is%20no%20equivalent%20way%20to%20add%20members%20to%20channels.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20couldn't%20find%20any%20obvious%20difference%20between%20the%20users.%20If%20i%20add%20them%20manually%20via%20the%20Teams%20client%20there%20are%20no%20problems.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20one%20got%20an%20idea%20whats%20the%20problem%20or%20how%20to%20solve%20this%3F%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1662225%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EGraphAPI%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1663376%22%20slang%3D%22en-US%22%3ERe%3A%20Bad%20Gateway%20when%20adding%20certain%20users%20to%20channel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1663376%22%20slang%3D%22en-US%22%3E%3CP%3EI%20tried%20to%20do%20the%20same%20with%20official%20Teams%20PowerShell%20Cmdlet%20and%20I%20get%20the%20same%20error.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ReinhardK_0-1600071340967.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F218111i2D001960FBD30B61%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22ReinhardK_0-1600071340967.png%22%20alt%3D%22ReinhardK_0-1600071340967.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThere%20seems%20to%20be%20some%20problem%20with%20these%20particular%20users.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1663381%22%20slang%3D%22en-US%22%3ERe%3A%20Bad%20Gateway%20when%20adding%20certain%20users%20to%20channel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1663381%22%20slang%3D%22en-US%22%3EHave%20you%20tried%20installing%20Teams%20PowerShell%20public%20preview%20modue%3F%3C%2FLINGO-BODY%3E
New Contributor

I have a very interesting problem where i get a 502 Bad Gateway error when adding certain users to a team or channel via the graph API.

https://docs.microsoft.com/en-us/graph/api/team-post-members?view=graph-rest-beta&tabs=http

https://docs.microsoft.com/en-us/graph/api/conversationmember-add?view=graph-rest-beta&tabs=http

Both fail for these users. The users are always the same. 

If use the group to add a member to the team

https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-beta&tabs=http

it works for these users. 

But as far as i know there is no equivalent way to add members to channels. 

I couldn't find any obvious difference between the users. If i add them manually via the Teams client there are no problems.

 

Any one got an idea whats the problem or how to solve this?

Thanks

3 Replies
Highlighted

I tried to do the same with official Teams PowerShell Cmdlet and I get the same error. 

ReinhardK_0-1600071340967.png

There seems to be some problem with these particular users.

Highlighted
Have you tried installing Teams PowerShell public preview modue?
Highlighted
I did test it with the latest version from PowerShellGallery: 1.1.5-preview
https://www.powershellgallery.com/packages/MicrosoftTeams/1.1.5-preview