Teams Hook error

Hi there,
trying to push notification to Teams with the avaiable package “Microsoft Teams - Post a message”. Set all required params, but I get error.
"OperationStopped: Execution failed (after 1 attempts): Exception calling “Invoke” with “0” argument(s): “A parameter cannot be found that matches parameter name ‘UseBasicParsing’.”

I have modified template and removed that param and it starts working.

Just letting you know. Jaroslav

Hi @jaroslav.urban,

Welcome to the Octopus Community, thanks for reaching out!

Great to hear you managed to get it working by removing that parameter, but it does seem very strange that UseBasicParsing isn’t found for Invoke-RestMethod since it is meant to be a valid parameter according to the docs.

What I believe could be causing this is an alias with curl, could you please confirm which version of Powershell you are using (or Windows Terminal) and if removing the alias for curl allows for it to succeed?

Check for current aliases and remove curl if present:

Get-Aliases 
Remove-item alias:curl

Let me know if that helps or if you have any questions at all!

Best Regards,

Hi @jaroslav.urban

Just to let you know we’ve published an update to the MS teams step template here.

Version 22 only adds the parameter when running on Windows PowerShell. PS Core no longer needs that parameter (as of version 6).

You may need to sync your local version of the library, or wait for the task to run on a schedule (usually around every 12 hours or so)

Hope that helps!

Best,

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.