Clarification on Using /sendActivityNotification API for Rich Content in Microsoft Teams

石川 敦己 275 Reputation points
2025-01-16T06:25:03.01+00:00

I have a question regarding the /sendActivityNotification API in Microsoft Graph.

In this documentation, under the section "You can use activity feed notifications to do the following:", it mentions "Show rich content in a Tab app or URL."

Could you provide more details on how this can be implemented? Initially, I imagined that it might be possible to display rich UI content directly within a Teams app by including necessary JSON for an Adaptive Card in the parameters of the /sendActivityNotification API, without implementing a Tab app or bot. Is this assumption incorrect?

Here is the context: We are exploring ways to notify users in Microsoft Teams about user-specific updates from our web application. Based on my research, it seems the /sendActivityNotification API can only include preview text or links. To provide more detailed, rich information, it appears that additional bot implementation might be required.

Since we only need one-way notifications (without interactive user communication), implementing a bot (especially one that considers user or tenant differences) feels like a significant overhead. However, is this the only viable option? (Note: Workflows or webhooks were excluded due to requiring too much user interaction).

In summary, my questions are:

  1. How should "Show rich content in a Tab app or URL." be correctly understood and implemented?
  2. If my understanding is incorrect, is bot implementation necessary for sending rich notifications?

I would greatly appreciate your assistance as we are struggling to find a clear solution. Thank you in advance!

Microsoft Teams | Development
Microsoft Teams | Development
Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs
Microsoft Security | Microsoft Graph
Microsoft Teams | Microsoft Teams for business | Other
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.