Describe the problem/error/question
I am trying to setup an OAuth2 credential to allow me to connect to the Azure DevOps API.
I keep getting error 400 in n8n after authorizing my app in the popup window. The callback with code is received by n8n. But for some reason it is unable to retrieve the token and mark the credential connected.
I have tried Microsoft OAuth2 and the OAuth2 API credential options but I have the same issue
The container display the following message -
OAuth2 authentication successful for new credential
What is the error message (if any)?
HTTP status 400 in a popup window
I just updated to 0.229.0 and now get the error below (thanks for this new feature )
Please share your workflow
- Create a new credential (I have tried Microsoft OAuth2 and the OAuth2 API)
- Enter the details for Client Id, Client Secret, Auth Url, Auth Token Url, Scope
- Click “Connect My Account”
- Authorise App
- Error 400 in the /callback?code= screen.
If i take the code query param and craft the following POST method in postman I can receive the token and refresh token.
POST https://app.vssps.visualstudio.com/oauth2/token
Headers:
Content-Type: application/x-www-form-urlencoded
Body:
client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer
grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
client_assertion={0} - This is the client secret
assertion={1} - This is the code
redirect_uri={2} - This is the n8n callback url
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
Information on your n8n setup
- **n8n version:0.229.0
- **Database (default: SQLite):Postgres
- **n8n EXECUTIONS_PROCESS setting (default: own, main):main
- **Running n8n via (Docker, npm, n8n cloud, desktop app):docker
- **Operating system:linux