Please check this blogpost for the resolution for your requirements
https://blog.nviso.eu/2022/05/18/detecting-preventing-rogue-azure-subscriptions/
Thank you