MS Teams Post As App

Is it possible to configure a bot or app to be used as the teams connector? The idea is we want to post to teams but not as my person but rather as the app we’ve created in Azure.

Anyone know how to do this?

1 Like

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:

Hey @chrisjames , I would expect you to be using a service account for that. See some guidance in this post, How to create a service account in Azure Active Directory, grant it read only permissions to graph api in azure? - Microsoft Q&A.

Hey @ihortom , I did create one of these as per the instructions when setting up teams connector NODE. But it always posts as my user account that I setup the credentials with, so not sure why it even asked me to connect account. Any suggestions? I inputted my client ID and secret correctly, etc. Still posts as me as the credentials page forces you to click “connect account” which uses personal account.

@chrisjames , you probably would have to have a dedicated email account added as the app owner and use that account to authenticate.

That’s unfortunate this node pack was built this way, 99% of users will want messages posted as a bot/app not a user…

I too came here with the same problem. The Teams Node is not really helpful when everything is authenticated as an individual. Most apps that integrate with Teams do so and appear as their App, not a person. As OP said, the problem is the way the oauth2 is handled as it requires us to login as a licensed user. Buying a licensed M365 user just for this seems like not a great solution and other apps with m365 integrations don’t need that. ONE of the problems of using a dedicated licensed user is the fact that MFA can’t be done, which is required and enforced by Conditional Access policies etc, and exempting it from those would not be ideal security-wise considering the permissions the user has from an API standpoint.

I am kinda surprised this has not been raised already when the node was made. It is the very first thing I encountered once I was setup my n8n lab and made a simple workflow connecting Teams to a vector database via LLM to see how it would fit into our company.

No way to do this? Doing stuff with Teams was key to one of the main reasons I wanted to switch to N8N.

Something I did test which seems to work is creating a user account (used as a service account) and assign it the FREE Microsoft Teams Rooms Basic license and then authenticate using your Azure App and then post as that user, seems to work fine! I just called the user profile COMPANY BOT… Works great! For now anyways.

Yeah. Just disappointed i suppose. Im guessing by the nodes and examples that N8N folks are using Google here, not M365. This would have come up already by now i suspect otherwise.

Using CoPilot it integrates instantly with Teams and you can make an icon directly in the Teams toolbar and you can interact with it in private chats and also within various teams channels. Obviously Microsoft makes both so i would expect nothing less.

The (apparent) lack of interest from N8N folks on this is unfortunate.

I just dont want to use Copilot…

Does N8N the company use M365? Seems the product is aligned a lot more with Google stuff and Slack etc vs M365. We’re heavy m365 as our client base we serve that I’m evaluating for as well does too.

Hi @chrisjames , in order to post as a bot you need to create one in your tenancy (you can create one way or two way bots) and then send messages using that. One way bots can not have any messages/replies sent to them.

I’ve written a webhoot.site script which does this and I am looking at converting it into an n8n node in coming weeks. Once I get to it, I’ll post something on here.

Hi everybody,

Have any of you made any progress on this issue?
I have the same problem. I would like to send messages in Teams as a virtual identity (Service Principal) and not as a real user.
Many thanks.

Interested in more details if you don’t mind sharing

You basically have to use an HTTP request as a service principal and post using API. Or you can create a bot user account, give it a free teams phone room license, then use that.

Hoping an improvement comes to this node to allow a service principal to authenticate as and post.

1 Like

N8N team has been updating the built in Teams node however it still uses user account creds.

I’ve made attempts to chime in on the Github changes relating to teams, however those comments went unanswered.

However if anyone else has any ways of getting through to the n8n team to relay this request, it would be appreciated.