A few problems with this, the main one being that I have not found a single case where a hidden inbox rule was actually used during a BEC. The script is problematic, in that it needs to use impersonation, doesn't work on an account with MFA, and uses EWS.
I really don't think this is sticking around, but if there's a better way to get this now that graph exists, it's worth looking at this.
I'll need to add a hidden inbox rule on one of my dev accounts to test this.
A few problems with this, the main one being that I have not found a single case where a hidden inbox rule was actually used during a BEC. The script is problematic, in that it needs to use impersonation, doesn't work on an account with MFA, and uses EWS.
I really don't think this is sticking around, but if there's a better way to get this now that graph exists, it's worth looking at this.
I'll need to add a hidden inbox rule on one of my dev accounts to test this.