{"record":{"id":"6f74a5e23988dc1a","repo":"FlowiseAI/Flowise","slug":"no-access-token-found-in-credential-6f74a5","errorCode":null,"errorMessage":"No access token found in credential","messagePattern":"No access token found in credential","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/tools/MicrosoftTeams/MicrosoftTeams.ts","lineNumber":928,"sourceCode":"        const channelActions = nodeData.inputs?.channelActions as string\n        const chatActions = nodeData.inputs?.chatActions as string\n        const chatMessageActions = nodeData.inputs?.chatMessageActions as string\n\n        let actions: string[] = []\n        if (teamsType === 'channel') {\n            actions = convertMultiOptionsToStringArray(channelActions)\n        } else if (teamsType === 'chat') {\n            actions = convertMultiOptionsToStringArray(chatActions)\n        } else if (teamsType === 'chatMessage') {\n            actions = convertMultiOptionsToStringArray(chatMessageActions)\n        }\n\n        let credentialData = await getCredentialData(nodeData.credential ?? '', options)\n        credentialData = await refreshOAuth2Token(nodeData.credential ?? '', credentialData, options)\n        const accessToken = getCredentialParam('access_token', credentialData, nodeData)\n\n        if (!accessToken) {\n            throw new Error('No access token found in credential')\n        }\n\n        const defaultParams = this.transformNodeInputsToToolArgs(nodeData)\n\n        const teamsTools = createTeamsTools({\n            accessToken,\n            actions,\n            defaultParams,\n            type: teamsType\n        })\n\n        return teamsTools\n    }\n\n    transformNodeInputsToToolArgs(nodeData: INodeData): Record<string, any> {\n        // Collect default parameters from inputs\n        const defaultParams: Record<string, any> = {}\n","sourceCodeStart":910,"sourceCodeEnd":946,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/tools/MicrosoftTeams/MicrosoftTeams.ts#L910-L946","documentation":"Thrown by MicrosoftTeams_MCP.init when getCredentialParam('access_token', credentialData, nodeData) returns falsy after refreshOAuth2Token. Identical pattern to the Outlook node: the Teams tools require a Bearer access token for Graph calls, and without one the toolset cannot be constructed.","triggerScenarios":"MicrosoftTeams node init with no credential, an unresolvable credential id, an OAuth2 credential missing access_token, or a refresh that did not yield an access_token.","commonSituations":"Wrong credential type attached; OAuth2 credential expired with no usable refresh_token; consent not granted so no access_token stored; nodeData.credential references a deleted credential.","solutions":["Attach a Microsoft OAuth2 credential containing access_token (and refresh_token).","Re-run the OAuth consent flow to capture a fresh token pair with Teams scopes (Team.Read, ChannelMessage.Send, etc.).","Verify refreshOAuth2Token's prerequisites (client_id, client_secret, token endpoint) are set on the credential.","Confirm nodeData.credential resolves to an existing credential id."],"exampleFix":"// before: credential missing access_token after refresh\n\n// after: attach a consented Microsoft OAuth2 credential with Teams scopes;\n// ensure refreshOAuth2Token populated access_token before init reads it.","handlingStrategy":"validation","validationCode":"const accessToken = getCredentialParam('access_token', credentialData, nodeData)\nif (!accessToken) {\n  throw new Error('Microsoft Teams credential missing access_token; re-consent with Teams scopes or attach a valid OAuth2 credential')\n}","typeGuard":"const hasAccessToken = (cred: Record<string, any> | undefined): boolean =>\n  !!cred && typeof cred.access_token === 'string' && cred.access_token.length > 0","tryCatchPattern":"try {\n  return await teamsNode.init(nodeData, _, options)\n} catch (e) {\n  if (e.message === 'No access token found in credential') {\n    // re-run OAuth consent with Teams scopes, then retry\n  }\n  throw e\n}","preventionTips":["Use the Microsoft OAuth2 credential type with Teams-related Graph scopes.","Store refresh_token so refreshOAuth2Token can renew access_token automatically.","Re-consent whenever new Teams actions are added that need additional scopes."],"tags":["microsoft","teams","oauth2","credentials","authentication"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}