{"record":{"id":"7f1fb8ee9915de14","repo":"FlowiseAI/Flowise","slug":"no-access-token-found-in-credential-7f1fb8","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/MicrosoftOutlook/MicrosoftOutlook.ts","lineNumber":740,"sourceCode":"                    messageActions: ['forwardMessage']\n                },\n                additionalParams: true,\n                optional: true\n            }\n        ]\n    }\n\n    async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {\n        const outlookType = nodeData.inputs?.outlookType as string\n        const calendarActions = nodeData.inputs?.calendarActions as string\n        const messageActions = nodeData.inputs?.messageActions as string\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        let actions: string[] = []\n        if (outlookType === 'calendar') {\n            actions = convertMultiOptionsToStringArray(calendarActions)\n        } else if (outlookType === 'message') {\n            actions = convertMultiOptionsToStringArray(messageActions)\n        }\n\n        const defaultParams = this.transformNodeInputsToToolArgs(nodeData)\n\n        const outlookTools = createOutlookTools({\n            accessToken,\n            actions,\n            defaultParams\n        })\n\n        return outlookTools","sourceCodeStart":722,"sourceCodeEnd":758,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/tools/MicrosoftOutlook/MicrosoftOutlook.ts#L722-L758","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Attach a Microsoft OAuth2 credential that contains an access_token (and a valid refresh_token for auto-refresh).","Re-authenticate the credential through the OAuth flow to obtain a fresh access_token + refresh_token.","Confirm refreshOAuth2Token succeeded (check the credential's OAuth2 config: client_id, client_secret, token_endpoint).","Verify nodeData.credential still points to an existing credential id."],"exampleFix":"// before: getCredentialParam('access_token', credentialData, nodeData) -> undefined\n\n// after: in Flowise UI, attach a valid Microsoft GraphAPI OAuth2 credential\n// and ensure refreshOAuth2Token populated credentialData.access_token before init reads it.","handlingStrategy":"validation","validationCode":"const accessToken = getCredentialParam('access_token', credentialData, nodeData)\nif (!accessToken) {\n  throw new Error('Microsoft Outlook credential missing access_token; re-consent 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 outlookNode.init(nodeData, _, options)\n} catch (e) {\n  if (e.message === 'No access token found in credential') {\n    // re-run OAuth consent for the attached credential, then retry\n  }\n  throw e\n}","preventionTips":["Use the dedicated Microsoft GraphAPI OAuth2 credential type with the required Outlook scopes.","Ensure refresh_token is stored so refreshOAuth2Token can renew access_token.","Periodically re-consent to keep tokens fresh and scopes correct."],"tags":["microsoft","outlook","oauth2","credentials","authentication"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}