Skip to content

MicrosoftTeamsNotifier does not appear to work with Workflows Webhooks #5321

@bchristensen-itron

Description

@bchristensen-itron

Spring Boot Admin Server information

  • Version:
    4.0.4

  • Spring Boot version:
    4.0.6

  • Configured Security:
    Basic Auth

  • Webflux or Servlet application:
    Servlet

Client information

  • Spring Boot versions:
    4.0.6

  • Used discovery mechanism:
    Self Registration

  • Webflux or Servlet application:
    Servlet

Description

I'm trying to enable Microsoft Teams notifications from Spring Boot Admin. I've added the following to my application.properties:

spring.boot.admin.notify.ms-teams.enabled=true
spring.boot.admin.notify.ms-teams.webhook-url=<myWebhookUrl>

I can see the MicrosoftTeamsNotifier trying to send but the following errors are logged:

2026-04-29T22:57:51.912+0000 [https-jsse-nio-9743-exec-2] ERROR [MicrosoftTeamsNotifier]  - Couldn't notify for event InstanceRegisteredEvent(super=InstanceEvent(instance=9492d28f9ad0, version=0, timestamp=2026-04-29T22:57:50.174145Z, type=REGISTERED), registration=Registration(name=My App, managementUrl=https://localhost:9743/actuator, healthUrl=https://localhost:9743/actuator/health, serviceUrl=https://localhost:9743/, source=http-api)) 

org.springframework.web.client.HttpClientErrorException$Unauthorized: 401 Unauthorized on POST request for "<myWebhookUrl>": [no body]
	at org.springframework.web.client.HttpClientErrorException.create(HttpClientErrorException.java:109)
	at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:144)
	at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:119)
	at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:807)
	at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:756)
	at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:715)
	at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:448)
	at de.codecentric.boot.admin.server.notify.MicrosoftTeamsNotifier.lambda$doNotify$0(MicrosoftTeamsNotifier.java:172)

I've followed the documentation here to set up a Webhooks on my Teams channel: https://support.microsoft.com/en-us/office/create-incoming-webhooks-with-workflows-for-microsoft-teams-8ae491c7-0394-4861-ba59-055e33f75498

As far as I can tell there is no authentication required for the Webhooks I set up in Teams. The description when I create one says:

Generate a webhook URL that lets anyone send external systems updates into a channel using rich adaptive cards or message cards.

I've dug through all the settings I can find and I don't see anything about authentication or permissions. I could be wrong and my organization has some global security setting turned on that I can't see. I did see some posts on Stack Overflow saying that authentication errors can appear when there are bad requests and that this makes debugging very difficult.

However, while digging around I found that Microsoft seems to have changed the API for Webhooks, see this announcement: https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-teams/

And it looks like the updated "Workflows" mechanism expects Adaptive Card JSON objects as inputs: https://adaptivecards.microsoft.com/?topic=AdaptiveCard

I'm definitely not an expert on any of this, but the examples of Adaptive Card structures do not appear to match the simple Message, Section, and Fact POJOs in Spring Boot Admin's MicrosoftTeamsNotifier. It looks like these classes have not been significantly changed since 2018, so I suspect they do not function with modern Teams.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions