Title: OAuth2 from Generic Credentials Type doesn’t work with HTTP Request Tool node but works with HTTP Request node
Description:
When using the OAuth2 credentials (specifically Microsoft Graph with grant type client_credentials) in n8n, there is an inconsistency between the HTTP Request Tool node and the HTTP Request node. Although the same credentials are applied to both nodes, the HTTP Request Tool node fails to recognize the credentials, resulting in an error message: “Credentials not found.” However, when using the same OAuth2 credentials in the HTTP Request node, the API call works as expected and returns the correct output.
This appears to be a bug specific to the HTTP Request Tool node’s handling of OAuth2 credentials under the Generic OAuth2 Credential Type.
To Reproduce
Create OAuth2 Credentials:
• Go to n8n settings and create a new OAuth2 credential set (e.g., Microsoft Graph).
• Set the grant type to client_credentials.
• Fill in the appropriate details for client ID, client secret, authorization URL, and token URL.
Test with HTTP Request node:
• Add an HTTP Request node.
• Configure it to use the newly created OAuth2 credentials.
• Set the request URL to an endpoint from Microsoft Graph (e.g., https://graph.microsoft.com/v1.0/me).
• Run the workflow.
• Expected result: The request works, and you receive the correct response from Microsoft Graph.
Test with HTTP Request Tool node:
• Add an HTTP Request Tool node in the same workflow.
• Configure the same request, using the same OAuth2 credentials and the same Microsoft Graph API endpoint.
• Run the workflow.
• Actual result: The request fails, and the error message “Credentials not found” is returned.
Expected behavior
The HTTP Request Tool node should behave in the same way as the HTTP Request node when using OAuth2 credentials, allowing for successful API requests without returning credential-related errors.
Both nodes should be able to authenticate and return the correct response from Microsoft Graph when using the same OAuth2 credentials.
Bug Description
Title: OAuth2 from Generic Credentials Type doesn’t work with HTTP Request Tool node but works with HTTP Request node
Description: When using the OAuth2 credentials (specifically Microsoft Graph with grant type client_credentials) in n8n, there is an inconsistency between the HTTP Request Tool node and the HTTP Request node. Although the same credentials are applied to both nodes, the HTTP Request Tool node fails to recognize the credentials, resulting in an error message: “Credentials not found.” However, when using the same OAuth2 credentials in the HTTP Request node, the API call works as expected and returns the correct output.
This appears to be a bug specific to the HTTP Request Tool node’s handling of OAuth2 credentials under the Generic OAuth2 Credential Type.
To Reproduce
Expected behavior
The HTTP Request Tool node should behave in the same way as the HTTP Request node when using OAuth2 credentials, allowing for successful API requests without returning credential-related errors. Both nodes should be able to authenticate and return the correct response from Microsoft Graph when using the same OAuth2 credentials.
Operating System
docker
n8n Version
1.59.4
Node.js Version
v20.17.0
Database
PostgreSQL
Execution mode
main (default)