Credit where it is due, I got most of this from Jonathan Conway's blog post at https://jonconwayuk.wordpress.com/2022/08/11/intune-proactive-remediation-bitlocker-key-escrow-to-azure-ad-after-mecm-osd-task-sequence
Detection Script: