Your managed identity needs permissions to talk to the Teams API, in particular it needs to be able to access the Teams parts of the Graph API. A managed identity is just an AAD application behind the scenes so you can grant API rights to it. This article shows a script for granting access to Managed Identities to the Graph API. This page details the various Teams API's.
Connecting a Logic App to Microsoft Teams with Managed Identity
I'm currently creating a Logic App workflow to send a message to a Microsoft Teams canal when it is triggered by a HTTP request. I am using the "Post a message to a canal as the flow bot" action.
However, I'm currently using my personal account as a connection, which is a bad practice regarding long term maintainability.
I see that there is an option to connect with a Managed Identity. I successfully enabled the system-assigned Managed Identity for my Logic App by going to the Settings and then the Identity part. However, I do not know how to allow this Managed Identity access to a specific canal on Microsoft Teams to post messages to it. I could not find anything on the web.
Azure Logic Apps
Microsoft Teams | Microsoft Teams for business | Other
-
Sam Cogan 10,812 Reputation points Microsoft Employee Volunteer Moderator
2021-01-20T13:51:10.257+00:00
3 additional answers
Sort by: Most helpful
-
Steven Molen 0 Reputation points
2024-12-13T18:00:46.6866667+00:00 I think the OP was asking about the specific TEAMS tasks in Logic Apps using authentication methods other than an org account, which the answer on this thread doesn't really address. (just that there's an api out there and you can call that api with the right permissions with a service principal after doing all the oauth things to get the right token, how annoying).
Honestly, I don't know how these connectors get past any kind of internal review without enterprise level auth in mind, which using a traditional org account for automation purposes is definitely not.
-
OJA_AE 1 Reputation point
2021-05-03T19:59:18.3+00:00 Assigned literally every API-permission to the managed identity. Doesn't work.
That said, the feature is still in preview. -
Kolundzija Nela (BSOT/PJ-AS-Bg) 0 Reputation points
2024-04-02T11:40:49.2+00:00 did anyone succeded to login to teams from logic app without personal account with service principle of managed identy ? thank you much needed help since want to persist all via terraform and not use my personal user for this