It will work. Both of those are separate instance processes of I/O. You would think they are connected but I'm fact are not. Intune doesn't care if your phone can can or can't pass safety net.
You have to delete BOTH INSTANCES of the apps... From the work profile AND the user profile BEFORE you attempt to hide Magisk. If you don't you are left with apps holding perseverance through prior data from the app.
WHY DOES THIS HAPPEN YOU MIGHT ASK?
WHEN INTUNE IS INITIALLY OPENED, a portion of it's properties gets pushed by a security function it has baked into its coding, that makes the areas needing to be hidden from Magisk actually do the reverse that you are trying to do with Magisk... Intune's API connectors will shroud themselves from Magisk, because they are taught to look for it.
There is no way to patch this unless you write the code to initialize the shrouding function upon install. They can't because the app has to be opened and a onboarding process get kicked off for the shrouding to take place.
So delete the apps and when you FIRST reinstall the app... BEFORE ANYTHING. Go to the app properties and delete cache and data BUT DONT OPEN IT. Once the intiial install data and cache is deleted once, you are fine to proceed.
Also you have to think ahead for this workaround and download and hide EVERY WORK APP you are going to need. Otherwise if you try and add afterwards, Magisk Hide could slip and INTUNE regain partial control and all your apps will begin to stall and fail.
*EDIT* I also was using Edxposed and Riru.
*SideNote* if you are using Lucky Patcher, you need to be careful with how you install system apps or erase Dalvik Cache, you don't want to add too much to the Magisk to keep track of, since you can't push lucky patcher through modules on Magisk. The module that is used MUST be turned off if you are updating any firmware or altering with Magisk of any kind. You have been warned.
You are a badass security engineer dude
I am a networks project manager with voice background and i would give you a promotion if i can
I have only Teams plus Company Intune and i was scratching my head to make teams work after i changed the phone ROM as i need it daily for conference calls