I have a script that performs a search on all our Exchange Online mailboxes for a string and deletes any emails containing that string. To do this, I create a Compliance Search and the an associated Compliance Search Action.
The script cleans up after itself by using Remove-ComplianceSearch and Remove-ComplianceSearchAction. The former works fine, but the latter command has started to fail in the last couple of weeks.
If I run GetComplianceSearchAction it will return (e.g.)