FlowiseAI/Flowise · error · Error

No access token found in credential

Error message

No access token found in credential

What it means

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.

Source

Thrown at packages/components/nodes/tools/MicrosoftTeams/MicrosoftTeams.ts:928

        const channelActions = nodeData.inputs?.channelActions as string
        const chatActions = nodeData.inputs?.chatActions as string
        const chatMessageActions = nodeData.inputs?.chatMessageActions as string

        let actions: string[] = []
        if (teamsType === 'channel') {
            actions = convertMultiOptionsToStringArray(channelActions)
        } else if (teamsType === 'chat') {
            actions = convertMultiOptionsToStringArray(chatActions)
        } else if (teamsType === 'chatMessage') {
            actions = convertMultiOptionsToStringArray(chatMessageActions)
        }

        let credentialData = await getCredentialData(nodeData.credential ?? '', options)
        credentialData = await refreshOAuth2Token(nodeData.credential ?? '', credentialData, options)
        const accessToken = getCredentialParam('access_token', credentialData, nodeData)

        if (!accessToken) {
            throw new Error('No access token found in credential')
        }

        const defaultParams = this.transformNodeInputsToToolArgs(nodeData)

        const teamsTools = createTeamsTools({
            accessToken,
            actions,
            defaultParams,
            type: teamsType
        })

        return teamsTools
    }

    transformNodeInputsToToolArgs(nodeData: INodeData): Record<string, any> {
        // Collect default parameters from inputs
        const defaultParams: Record<string, any> = {}

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Attach a Microsoft OAuth2 credential containing access_token (and refresh_token).
  2. Re-run the OAuth consent flow to capture a fresh token pair with Teams scopes (Team.Read, ChannelMessage.Send, etc.).
  3. Verify refreshOAuth2Token's prerequisites (client_id, client_secret, token endpoint) are set on the credential.
  4. Confirm nodeData.credential resolves to an existing credential id.

Example fix

// before: credential missing access_token after refresh

// after: attach a consented Microsoft OAuth2 credential with Teams scopes;
// ensure refreshOAuth2Token populated access_token before init reads it.
Defensive patterns

Strategy: validation

Validate before calling

const accessToken = getCredentialParam('access_token', credentialData, nodeData)
if (!accessToken) {
  throw new Error('Microsoft Teams credential missing access_token; re-consent with Teams scopes or attach a valid OAuth2 credential')
}

Type guard

const hasAccessToken = (cred: Record<string, any> | undefined): boolean =>
  !!cred && typeof cred.access_token === 'string' && cred.access_token.length > 0

Try / catch

try {
  return await teamsNode.init(nodeData, _, options)
} catch (e) {
  if (e.message === 'No access token found in credential') {
    // re-run OAuth consent with Teams scopes, then retry
  }
  throw e
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/6f74a5e23988dc1a. Report an issue: GitHub.