FlowiseAI/Flowise · error · Error
Team ID, Channel ID, and User ID are all required
Error message
Team ID, Channel ID, and User ID are all required
What it means
Thrown synchronously by AddChannelMemberTool._call when teamId, channelId, or userId is falsy after the params merge. Above the try block at core.ts:467, propagates as a raw Error. zod schema (core.ts:450) marks all three required. The body at core.ts:472 uses user@odata.bind referencing the user resource URL — a wrong userId surfaces downstream as error 440 (400/404), but the missing-arg case is caught here first.
Source
Thrown at packages/components/nodes/tools/MicrosoftTeams/core.ts:468
schema: z.object({
teamId: z.string().describe('ID of the team that contains the channel'),
channelId: z.string().describe('ID of the channel'),
userId: z.string().describe('ID of the user to add')
}),
baseUrl: BASE_URL,
method: 'POST',
headers: {}
}
super({ ...toolInput, accessToken: args.accessToken, defaultParams: args.defaultParams })
}
protected async _call(arg: any): Promise<string> {
const params = { ...arg, ...this.defaultParams }
const { teamId, channelId, userId } = params
if (!teamId || !channelId || !userId) {
throw new Error('Team ID, Channel ID, and User ID are all required')
}
try {
const body = {
'@odata.type': '#microsoft.graph.aadUserConversationMember',
'user@odata.bind': `https://graph.microsoft.com/v1.0/users('${userId}')`
}
const endpoint = `/teams/${teamId}/channels/${channelId}/members`
await this.makeTeamsRequest(endpoint, 'POST', body)
return this.formatResponse(
{
success: true,
message: 'Member added to channel successfully'
},
params
)View on GitHub (pinned to abe4a8601a)
Solutions
- Pass teamId, channelId, and userId (Azure AD object ID, GUID-shaped) explicitly.
- If you only have a UPN/email, resolve it first via /users?$filter=mail eq '...' and pass the returned id.
- Fix the params spread order.
- Catch the propagated Error upstream.
Example fix
// before
const params = { ...arg, ...this.defaultParams }
// after
const params = { ...this.defaultParams, ...arg } Defensive patterns
Strategy: validation
Validate before calling
function validateAddChannelMemberInput(input: unknown) {
const { teamId, channelId, userId } = (input ?? {}) as any
for (const [k, v] of Object.entries({ teamId, channelId, userId })) {
if (typeof v !== 'string' || !v.trim()) throw new Error(`${k} required`)
}
if (!/^[0-9a-f-]{36}$/i.test(userId)) {
throw new Error('userId must be an Azure AD object ID (GUID) — resolve UPN first')
}
} Type guard
function isAddChannelMemberArgs(x: unknown): x is { teamId: string; channelId: string; userId: string } {
const o = x as any
return typeof x === 'object' && x !== null &&
typeof o.teamId === 'string' && o.teamId.trim() !== '' &&
typeof o.channelId === 'string' && o.channelId.trim() !== '' &&
typeof o.userId === 'string' && /^[0-9a-f-]{36}$/i.test(o.userId)
} Try / catch
try {
if (!isAddChannelMemberArgs(input)) return { error: 'teamId, channelId, and a GUID userId are required' }
return await addChannelMemberTool.invoke(input)
} catch (e) {
return { error: (e as Error).message }
} Prevention
- Always pass the Azure AD object ID (GUID), not a UPN or email — this check accepts any string but Graph rejects non-GUIDs downstream.
- Resolve UPN/email via GET /users?$filter=mail eq '...' first.
- Audit defaultParams; resolve IDs from prior list calls.
When it happens
Trigger: add_channel_member invoked without all three IDs; defaultParams clobbering any of them; agent passing a UPN/email where a GUID userId is required (technically passes this check, fails at Graph).
Common situations: Agent confusing UPN with userId; defaultParams misconfiguration; UI form missing the user picker value; member just-in-time resolution failing.
Related errors
- Both Team ID and Channel ID are required
- Team ID and Display Name are required to create a channel
- User is not a member of this channel
- Members list is required to create a chat
- Team ID is required to list channels
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/8984faf1e7c1518d.
Report an issue: GitHub.