"ResourceNotFound" Error from the existing Azure Policy once the VM was deployed
I am trying to add MDE for all the resources. I know there is an "Endpoint Protection" function on server's service of CWP. But my requirement is that we need to control MDE's deployment by policy. So, I purchased the CWP server's service but turn it off to stop automatic agent deployment.
There is a policy "[Preview]: Deploy Microsoft Defender for Endpoint agent on Linux virtual machines" which I think it's created by Azure, and I assigned it to my test subscription.
The issue is that once I deployed a Linux VM, the policy wouldn't deploy MDE.Linux successfully and a "ResourceNotFound" error could be found in the compliance reason without any detail. Something wired for me is that if I make a remediation task of the above policy after the failing, it does deploy the MDE successfully and it works as expected.