Cannot authenticate to Outlook 365

I am trying to create outlook credentials for a user on GoDaddy hosted Office365. I have followed to the letter the creation of the application in Microsoft and no joy. I keep getting an error saying “not authorized”

If I use the exact same credentials and create entra credentials, it works first time with no issues.

I am using n8n:latest self-hosted Docker and traefik

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:
  • n8n version: 1.53.2
  • Database (default: SQLite):default
  • n8n EXECUTIONS_PROCESS setting (default: own, main):default
  • Running n8n via (Docker, npm, n8n cloud, desktop app):Docker
  • Operating system:Linux

Hey @adrian.ellis,

Welcome to the community :raised_hands:

Sometimes this happens if you copy the private ID instead of the private key when going through the app registration process in Azure.

Can you create a new key and make sure that is the value you use and not the id. It would also be worth making sure that you are accessing n8n using the same url as the redirect.

Hi @Jon

I using the instructions supplied here Microsoft Outlook | n8n Docs and here Microsoft credentials | n8n Docs and many other rabbit holes.

image

This is what I got from Microsoft which is what I had to use, according to the above documentations. But still no joy.

I need to be able to create an event directly in the user’s calendar and send email as if the system was the user.

The latter is easy as this can be done using SMTP integration.

Hey @adrian.ellis,

Assuming you used the MoE8Q value for the secret that is correct, I would move to the rest of the config and check the URLs

{
“errorMessage”: “Unable to sign without access token”,
“errorDetails”: {
“rawErrorMessage”: [
“Unable to sign without access token”
]
},
“n8nDetails”: {
“nodeName”: “Microsoft Outlook”,
“nodeType”: “n8n-nodes-base.microsoftOutlook”,
“nodeVersion”: 2,
“resource”: “contact”,
“operation”: “create”,
“itemIndex”: 0,
“time”: “2024/08/26, 17:36:46”,
“n8nVersion”: “1.53.2 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“NodeApiError: Unable to sign without access token”,
" at Object.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1293:19)“,
" at Object.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:2084:20)”,
" at Object.microsoftApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Microsoft/Outlook/v2/transport/index.js:32:16)“,
" at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Microsoft/Outlook/v2/actions/contact/create.operation.js:50:26)”,
" at Object.router (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Microsoft/Outlook/v2/actions/router.js:54:36)“,
" at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Microsoft/Outlook/v2/MicrosoftOutlookV2.node.js:16:16)”,
" at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:728:19)“,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:673:51”,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1086:20"
]
}
}

I have checked, double checked, deleted and re-added, and still have the same issue.

1 Like

Found my problem, and I feel really stupid for it.

Everything was setup correctly, all steps were followed correctly. However, Firefox popup blocker saw fit to curse my soul.

Just by chance, I happened to see a small message in the top right corner saying popup blocked did I realize what I had happened.

As soon as I allowed the site, the authentication pop up window came up, i signed in, and I have not looked back.

Thanks Guys,
A

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.