Skip to content

[BUG] Teams notification response: Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 400 with ContextId 01=2. #125

Closed as duplicate

Description

@jamesl1234

What happened?

After a job runs I get this error in the logs and I do not get anything in the channel.

Teams notification response: Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 400 with ContextId 01=2.

Steps To Reproduce

Run a job
Job completes
Nothing in Teams
Logs show this (when logging is set to debug).

VeeamNotify version

2.1.1

PowerShell version

5.1

Veeam Backup & Replication build number

12.3.2.3617

Relevant log output

**********************
Windows PowerShell transcript start
Start time: 20250920120511
Username: DOMAIN\SYSTEM
RunAs User: DOMAIN\SYSTEM
Configuration Name: 
Machine: WIN2022 (Microsoft Windows NT 10.0.20348.0)
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\VeeamScripts\VeeamNotify\Bootstrap.ps1
Process ID: 17760
PSVersion: 5.1.20348.4163
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.20348.4163
BuildVersion: 10.0.20348.4163
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
2025-09-20T02:05:11.321Z [INFO] Transcript is being logged to 'C:\VeeamScripts\VeeamNotify\log\2025-09-20_12.05.11_Bootstrap.log'.
2025-09-20T02:05:11.417Z [INFO] Version: v2.1.1
2025-09-20T02:05:11.734Z [INFO] Configuration validated successfully.
2025-09-20T02:05:11.750Z [INFO] Attempting to retrieve job ID and session ID from the parent process.
2025-09-20T02:05:11.924Z [INFO] Getting VBR job details
2025-09-20T02:05:16.733Z [INFO] Getting VBR session information
2025-09-20T02:05:16.883Z [INFO] Bootstrap script for Veeam job 'VWLC-VWLC2_clone1 (Incremental)' (job 015859d9-cb36-4b96-9672-7c9055d4d2cf session 26c380c4-93c6-439c-be0c-30cf929dd354) - Session & job detection complete.
2025-09-20T02:05:16.914Z [INFO] Launching AlertSender.ps1...
2025-09-20T02:05:16.955Z [INFO] AlertSender.ps1 launched successfully.
2025-09-20T02:05:16.987Z [INFO] Stopping transcript logging.
**********************
Windows PowerShell transcript end
End time: 20250920120516
**********************
**********************
Windows PowerShell transcript start
Start time: 20250920120520
Username: DOMAIN\SYSTEM
RunAs User: DOMAIN\SYSTEM
Configuration Name: 
Machine: WIN2022 (Microsoft Windows NT 10.0.20348.0)
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -File C:\VeeamScripts\VeeamNotify\AlertSender.ps1 -JobId 015859d9-cb36-4b96-9672-7c9055d4d2cf -SessionId 26c380c4-93c6-439c-be0c-30cf929dd354 -JobType Backup -Config {
  "services": {
           "discord": {
                   "enabled": false,
                   "webhook": "DiscordWebhook",
                   "user_id": "123456789"
                 },
           "slack": {
                  "enabled": false,
                  "webhook": "SlackWebhook",
                  "user_id": "A1B2C3D4E5"
                },
           "teams": {
                  "enabled": true,
                  "webhook": "https://domain.webhook.office.com/webhookb2/...",
                  "user_id": "user@domain.com",
                  "display_name": "firstname surname"
                },
           "telegram": {
                   "enabled": false,
                   "bot_token": "TelegramBotToken",
                   "chat_id": "TelegramChatID",
                   "user_name": "yourusername"
                 },
           "http": {
                 "enabled": false,
                 "url": "EndpointURL",
                 "method": "POST"
               }
         },
  "mentions": {
           "on_failure": true,
           "on_warning": true,
           "on_success": true
         },
  "notifications": {
             "on_success": true,
             "on_failure": true,
             "on_warning": true
           },
  "logging": {
          "enabled": true,
          "level": "debug",
          "max_age_days": 7
        },
  "update": {
          "notify": true,
          "auto_update": false,
          "auto_update_comment": "auto_update is not yet implemented. This will do nothing even if \u0027true\u0027."
        },
  "thumbnail": "https://raw.githubusercontent.com/tigattack/VeeamNotify/main/asset/thumb01.png"
}
 -Logfile C:\VeeamScripts\VeeamNotify\log\2025-09-20_12.05.11-VWLC-VWLC2_clone1_(Incremental).log
Process ID: 8480
PSVersion: 5.1.20348.4163
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.20348.4163
BuildVersion: 10.0.20348.4163
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
2025-09-20T02:05:20.549Z [INFO] Transcript is being logged to 'C:\VeeamScripts\VeeamNotify\log\2025-09-20_12.05.11-VWLC-VWLC2_clone1_(Incremental).log'.
2025-09-20T02:05:26.275Z [INFO] No update available.
2025-09-20T02:05:26.305Z [DEBUG] Skipping Discord notification as it is not enabled.
2025-09-20T02:05:26.305Z [DEBUG] Skipping Slack notification as it is not enabled.
2025-09-20T02:05:28.867Z [INFO] Teams notification sent successfully.
2025-09-20T02:05:28.867Z [DEBUG] Teams notification response: Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 400 with ContextId 01=2..
2025-09-20T02:05:28.867Z [DEBUG] Skipping Telegram notification as it is not enabled.
2025-09-20T02:05:28.867Z [DEBUG] Skipping Http notification as it is not enabled.
2025-09-20T02:05:28.867Z [DEBUG] Running log cleanup.
VERBOSE: Performing the operation "Remove expired log files" on target "C:\VeeamScripts\VeeamNotify\log".
2025-09-20T02:05:28.898Z [DEBUG] Searching for log files older than 7 days.
2025-09-20T02:05:28.914Z [DEBUG] Found 0 logs files exceeding retention period.
2025-09-20T02:05:28.914Z [INFO] Stopping transcript logging.
**********************
Windows PowerShell transcript end
End time: 20250920120528
**********************

Activity

  1. tigattack commented on Sep 20, 2025

    @tigattack
    Owner

    Hi, thanks for the report. This appears to be the same issue logged in #122.

    I've already written up a possible fix, but am unable to test personally as I no longer have access to MS Teams for testing. If you're willing to help test it, please have a look at #122 for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions