Forum Discussion

Antonia's avatar
Antonia
New Member
1 year ago
Solved

Send Images in Teams Notifications from Fabric Notebooks

I run data validations in Fabric using PySpark. I want to send notifications with images (like plots) to Microsoft Teams channels or chats. I tried using a Teams webhook, but it doesn’t support...
  • v-karpurapud's avatar
    1 year ago

    Hi Antonia 

    Thank you for contacting the Microsoft Fabric Community Forum.

    Uploading images directly via Microsoft Teams webhooks is not supported. While the Microsoft Graph API provides more options, it poses significant authentication challenges, particularly in Microsoft Fabric Notebooks where token management and user context are restricted.

    A more effective approach is to use the Teams activity in Microsoft Fabric Data Factory. You can create an image, such as a plot with PySpark or Matplotlib, save it locally, and upload it to a secure location like Azure Blob Storage using a Shared Access Signature (SAS) token.

    Once the image is accessible via SAS, you can reference it in the Teams activity message body using Markdown syntax. This ensures the image displays correctly in the Teams message without complex authentication or additional tools.

    This solution is secure, reliable, and fully integrated within the Microsoft Fabric ecosystem, making it well-suited for automated workflows involving data validations, alerts, or reporting.

    For additional guidance, refer to the official Microsoft Fabric documentation onCreate & Send Actionable Messages - Teams , Teams activity (Preview) - Microsoft Fabric and Grant limited access to data with shared access signatures (SAS) - Azure Storage .

    Regards,
    Karpurapu D,
    Microsoft Fabric Community Support Team.