FlowiseAI/Flowise · error · Error

No access token found in credential

Error message

No access token found in credential

What it means

Thrown by MicrosoftOutlook_MCP.init when getCredentialParam('access_token', credentialData, nodeData) returns falsy. The node first refreshes the OAuth2 token via refreshOAuth2Token using the attached credential, then reads access_token; if the credential is missing, of the wrong type, or has no access_token field after refresh, the Graph client cannot authenticate.

Source

Thrown at packages/components/nodes/tools/MicrosoftOutlook/MicrosoftOutlook.ts:740

                    messageActions: ['forwardMessage']
                },
                additionalParams: true,
                optional: true
            }
        ]
    }

    async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
        const outlookType = nodeData.inputs?.outlookType as string
        const calendarActions = nodeData.inputs?.calendarActions as string
        const messageActions = nodeData.inputs?.messageActions as string

        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')
        }

        let actions: string[] = []
        if (outlookType === 'calendar') {
            actions = convertMultiOptionsToStringArray(calendarActions)
        } else if (outlookType === 'message') {
            actions = convertMultiOptionsToStringArray(messageActions)
        }

        const defaultParams = this.transformNodeInputsToToolArgs(nodeData)

        const outlookTools = createOutlookTools({
            accessToken,
            actions,
            defaultParams
        })

        return outlookTools

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Attach a Microsoft OAuth2 credential that contains an access_token (and a valid refresh_token for auto-refresh).
  2. Re-authenticate the credential through the OAuth flow to obtain a fresh access_token + refresh_token.
  3. Confirm refreshOAuth2Token succeeded (check the credential's OAuth2 config: client_id, client_secret, token_endpoint).
  4. Verify nodeData.credential still points to an existing credential id.

Example fix

// before: getCredentialParam('access_token', credentialData, nodeData) -> undefined

// after: in Flowise UI, attach a valid Microsoft GraphAPI OAuth2 credential
// and ensure refreshOAuth2Token populated credentialData.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 Outlook credential missing access_token; re-consent 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 outlookNode.init(nodeData, _, options)
} catch (e) {
  if (e.message === 'No access token found in credential') {
    // re-run OAuth consent for the attached credential, then retry
  }
  throw e
}

Prevention

When it happens

Trigger: MicrosoftOutlook node init with: no credential attached; a credential id that does not resolve; a credential that has no access_token (and no refresh_token to obtain one); refreshOAuth2Token silently failed to populate access_token.

Common situations: Wrong credential type attached (e.g. basic auth instead of Microsoft OAuth2); OAuth credential expired and refresh token revoked or missing; credential saved before consent completed so no access_token was stored; nodeData.credential references a deleted credential.

Related errors


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