Describe the problem/error/question
I tried connecting my self hosted n8n to my employers MS teams.
I followed all steps in Microsoft credentials | n8n Docs
When trying to connect with my personal login, I got the message that somebody with admin rights needed to do the sign-in. I contactet our IT helpdesk and they took over my screen, logged in with their admin account, checked all checkboxes on the initial connection and connection is made.
Credentials screen:
When using the node I can’t find any team when tryin gto search for it via the “from List”:
However when searching for the team by URL, I do get a list of all channels for that team, so there seems to be a connection:
When trying to post a message to a specific channel however, I get an error saying: Failed to get license information for the user. Ensure user has a valid Office365 license assigned to them.
What is the error message (if any)?
Failed to get license information for the user. Ensure user has a valid Office365 license assigned to them.
Please share your workflow
When incoming webhook, post message to teams channel.
Share the output returned by the last node
{
“errorMessage”: “Failed to get license information for the user. Ensure user has a valid Office365 license assigned to them.”,
“errorDetails”: {
“rawErrorMessage”: [
“Failed to get license information for the user. Ensure user has a valid Office365 license assigned to them.”
],
“httpCode”: “403”
},
“n8nDetails”: {
“nodeName”: “Microsoft Teams”,
“nodeType”: “n8n-nodes-base.microsoftTeams”,
“nodeVersion”: 2,
“resource”: “channelMessage”,
“operation”: “create”,
“time”: “11/19/2024, 12:01:18 PM”,
“n8nVersion”: “1.65.2 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“NodeApiError: Failed to get license information for the user. Ensure user has a valid Office365 license assigned to them.”,
" at Object.microsoftApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Microsoft/Teams/v2/transport/index.js:37:15)“,
" at processTicksAndRejections (node:internal/process/task_queues:95:5)”,
" at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Microsoft/Teams/v2/actions/channelMessage/create.operation.js:89:16)“,
" at Object.router (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Microsoft/Teams/v2/actions/router.js:51:36)”,
" at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Microsoft/Teams/v2/MicrosoftTeamsV2.node.js:16:16)“,
" at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:722:19)”,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:707:51",
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1137:20"
]
}
}
Information on your n8n setup
- n8n Community version : 1.67.1
- Running n8n via Docker