[Tutorial] [Root] How to configure 'Microsoft Intune' to make it work with 'Magisk' (Update: Q3/2023)

Search This thread

supermansaga

Senior Member
Mar 12, 2011
324
68
I can see how annoying Teams is. It checks company Portal every time one opens it up. Should you have connection issues to company Portal because you are in some unsupported countries of Android Enterprise, it will no longer refresh.

Outlook doesn't behave like that. Nor is Edge.
 
Last edited:
  • Like
Reactions: digger16309

NightMean

Senior Member
Mar 31, 2014
286
93
Google Nexus 4
Samsung Galaxy Mega
After so many failures, today intune/edge/outlook/edge/SEP Mobile all work for me. And they are all on the latest version with me being on April update. This is amazing considering Marriott 10.13.1 would detect root. My set up has been super simple, Shamiko 0.7 whitelist and check the apps on the denylist anyways without enforcing it. Magisk official 26101. Several XPosed modules that would cause Applist Detector to show vulnerabilities. XPrivacyLua didn't work on Marriot, so not sure why i want to keep it.

I guess folks who have been using old versions should feel safe to update their apps to

Intune Company Portal: 5.0.5849.0
Outlook: 4.2312.3
Edge: 111.0.1661.59
Teams: 1416/1.0.0.2023072702
SEP Mobile: 4.14.1

Not sure what led to this miracle. The process isn't straightforward as that on iOS. Phew! I had thought my Google location in a non-supported country was the cause of not working over a period of weeks, but I guess i am lucky. Maybe it's my openclash magic and openwrt now being on the latest release v0.45.112-beta and 22.03.4 respectively too. Hope this helps.
Thanks for this.
I have tried to use the same versions as you mentioned for O365 but Intune still detected the root.
I'm using oficial Magisk 26.1 with SafetyNet fix by Displax 2.4.0 + LSPosed Zygisk 1.8.6 + Shamiko 0.7.2 - deny list (not enforced of course) on all O365 apps that I have. I also configured Hide My Applist and XPrivacyLua to hide the app list as well for Intune.
I use couple of LSPosed modules as well e.g. Classic Power Menu, Disable FLAG_SECURE, ChatHeadEnabler, Iconify, Let Me Downgrade but I don't think these would make intune detect the root.

Does anyone else have any other suggestions? I was using 2 years old version of Intune and it worked fine, I'd like to use something newer because on A13 the battery drain from those old apps is quite huge.
 

Kris Chen

Senior Member
Today I tried it to replace of MagiskSU by KernelSU in my Pixel 4XL. It's working like a charm. I don't need to setup any magiskhide or flash any USNF. It directly pass safetynet checking.
The bank app, most updated version of teams/outlook, all working well in KernelSU.

The disadvantage of KernelSU is that someone need to compile the KernelSU to fit your phone's model. Now more and more mods support for KernelSU.
 

Zeebeest1

Member
Mar 5, 2021
7
2
29
The Netherlands
Xiaomi Poco F1
Thanks for this.
I have tried to use the same versions as you mentioned for O365 but Intune still detected the root.
I'm using oficial Magisk 26.1 with SafetyNet fix by Displax 2.4.0 + LSPosed Zygisk 1.8.6 + Shamiko 0.7.2 - deny list (not enforced of course) on all O365 apps that I have. I also configured Hide My Applist and XPrivacyLua to hide the app list as well for Intune.
I use couple of LSPosed modules as well e.g. Classic Power Menu, Disable FLAG_SECURE, ChatHeadEnabler, Iconify, Let Me Downgrade but I don't think these would make intune detect the root.

Does anyone else have any other suggestions? I was using 2 years old version of Intune and it worked fine, I'd like to use something newer because on A13 the battery drain from those old apps is quite huge.
Have you tried running the detection test in HMA? Mine showed some Xposed modules I use (like Greenify) that were found. I create my blacklist template so it would contain all root-related applications, following this guide: https://github.com/mModule/guide_hma/blob/master/BlackList.md

Also I ran a shell terminal on my phone to see if I had previously created a "corrupt" work profile by running the following commands (make sure you grant your terminal app superuser rights via Magisk):
-su
-pm list users

This showed me the following users:

UserInfo{0:Your Name:13} running
UserInfo{999:Multi-App:4000030} running

The top user is the default profile, with user ID 0, the bottom one the work profile created with user ID 999 (for instance). I was able to delete the work profile by running:

-pm remove-user 999

Afterwards I deleted my Company Portal + Office apps, rebooted my phone, installed them again (the most recent versions) and made sure to add them back on the Magisk denylist before opening company portal. I was finally able to create a work profile, since then everything has been running smoothly so far. I run Pixel Experience 12 Plus on a Xiaomi Pocofone F1 in case you were wondering.
 
  • Like
Reactions: Sage and pocketrule

Mani_Sundar

Member
Jul 15, 2022
12
4
Hai everyone,

Anyone having solution to fix the root detection by my intune portal ??

I'm thinking relock my mobile if there is no solution
 

chaoscreater

Senior Member
Does this still work as of today? I've tried everything and can't get this to work.

- I'm on Android 13, using MIUI.eu
- SafetyNet passes perfectly
- Using Zygisk without denylist enforced, but configured correctly for Teams and Company Portal. All the submenu items are ticked. Have also done this for Google Play Store, Google Play Services, Google Services Framework, etc
- Magisk app hidden
- Using Shamiko
- Using Hide my Applist and configured it correctly, so that the Applist Detector shows everything as passed. Applied the template to Company Portal and Teams
- Removed work profile created by Company Portal and re-tried again

I'm able to get Company Portal to create the work profile, but when it reaches the stage to add my device to AAD, that's where it fails. Typically, it wouldn't let you even create a work profile if it has detected root on your device.

I've tried with the latest versions of Company Portal and Teams from Play Store, as well as older versions.


UPDATE:

OK so I got it working.


1. Uninstall Teams and Company Portal
2. Install LSPosed zygisk module
3. Install Shamiko Magisk module and make sure Denylist is not enforced
4. Install Hide My Applist
5. Install Teams and Company Portal but do NOT run them yet
6. Go to the denylist in Magisk and add Play Store, Google Play Services, Google Services Framework, Company Portal and Teams and tick all the sub-menu options for all of them. Note that if you reinstall Company Portal and Teams, the sub-menu items will need to be re-ticked in the denylist again
7. Enable Hide My Applist module in LSPosed. Configure the Hide My AppList to use a blacklist to hide root from the above mentioned apps. Alternatively, you can use my config. Just create a file called "HMA_Config.json" and add the contents from this link (https://pastebin.com/Sq4mm0AR) into the file. Once you're done, just restore that file in Hide My Applist.
8. Reboot phone. This is required in order for the LSPosed module to take effect.
9. Do NOT sign into Company Portal. Just sign into Teams. Check the Hide My Applist logs and it should show logs for Company Portal and Teams. Teams will call the Company Portal app in the background to do the root check.
10. If you did all the above correctly, then Teams should be working fine



Remember, do NOT sign into Company Portal app, there's no need. Just sign into the actual apps you want to use, like Teams, Outlook, etc.

I recommend installing Edge, because when you try to open links in Teams, it'll need to use Edge. It doesn't seem to use Chrome for some reason. Remember to apply the above steps to hide root from Edge.

If you need to use Outlook, I recommend installing Outlook Lite, because this doesn't require you to set up Outlook as device administrator and you won't need to worry about your IT admin potentially pushing Intune policies to your device.

If you do need to install the full version of Outlook, then you may be prompted to add it as a Device Administrator. This is dangerous, because it means your company could potentially issue a wipe command from InTune and Outlook will wipe your device. Read the permissions granted by Device Administrator carefully, those are all dangerous. To prevent this, you can use MacroDroid or Tasker to automate the adding and removing of device admin, by using ADB shell commands.



enable:
adb shell dpm set-active-admin --user current com.microsoft.office.outlook/com.acompli.accore.receivers.OutlookDeviceAdminReceiver

disable:
adb shell pm disable-user com.microsoft.office.outlook

You can run shell scripts in both Tasker and MacroDroid, so a lot of this can be automated.

I also recommend using Tasker / MacroDroid to disable (freeze) and enable apps as required. I use MacroDroid and I have shortcuts for enable and disable respectively. When I run Teams, I click on "Teams (En)" and it'll enable the Company Portal app and Teams app and launch it for me, as well as use UI interaction to enter my PIN unlock code for Teams. When I click "Teams (Dis)", it'll disable the Company Portal and Teams app for me, so they never run in the background and never apply any policies to my phone (if any).

Here's something funny and interesting that I found. Let's say you have Teams installed and it is hidden from root and let's say you have Edge installed and it's not hidden from root. When you open links in Teams, it'll open with Edge and you'll be shown the error about root being detected on your device. But you can still go back to Teams and use it without issue, because it doesn't know about root. It seems like root detection is not shared among the Office apps, it's per app. Once I've hidden root from Edge, it works fine. I didn't have to uninstall it. It's not the same for Teams though. If your Teams detects root, you'll need to uninstall it and repeat the steps outlined above.

What's also interesting is that on some of my devices, especially ones running AOSP custom rom, it'll prompt to create a work profile. But on other devices, it doesn't create a work profile. Furthermore, on the devices that have a work profile, you can delete the work profile and Teams will continue to function.

I found that if you delete the work profile AND the work account, Teams is somehow still logged in and functions just fine. In some cases, it may even remove the PIN requirement/policy. What I mean by this is that your company IT admin may use InTune to enforce password policies for Teams. For me, I need to set a PIN number for Teams and then when I launch it, I need to enter the pin. This is NOT the same as the PIN used on your phone's lockscreen, this is specific to Teams only. By removing the work profile and work account, this sometimes bypasses the PIN setup process and therefore removes the need to enter a PIN.

Anyway, the conclusion is that apps like Teams, Edge and Outlook don't actually require a work profile to function. If you already have an existing work profile created by another app, then that's fine and it shouldn't interfere with Teams. If you don't want the Company Portal app to create a work profile for you, then try to create one yourself using apps like Shelter - https://f-droid.org/en/packages/net.typeblog.shelter/

Once you've got a work profile created, it will not be overwritten by other apps, even if they prompt you to create a work profile. By using Shelter to create a work profile, you prevent Company Portal from creating one (if it prompts you to anyway).
 
Last edited:

usr3

Senior Member
Jan 19, 2016
60
34
Nothing Phone 1
Does this still work as of today? I've tried everything and can't get this to work.

- I'm on Android 13, using MIUI.eu
- SafetyNet passes perfectly
- Using Zygisk without denylist enforced, but configured correctly for Teams and Company Portal. All the submenu items are ticked. Have also done this for Google Play Store, Google Play Services, Google Services Framework, etc
- Magisk app hidden
- Using Shamiko
- Using Hide my Applist and configured it correctly, so that the Applist Detector shows everything as passed. Applied the template to Company Portal and Teams
- Removed work profile created by Company Portal and re-tried again

I'm able to get Company Portal to create the work profile, but when it reaches the stage to add my device to AAD, that's where it fails. Typically, it wouldn't let you even create a work profile if it has detected root on your device.

I've tried with the latest versions of Company Portal and Teams from Play Store, as well as older versions.


UPDATE:

OK so I got it working.

1. Uninstall Teams and Company Portal
2. Install Shamiko Magisk module and make sure Denylist is not enforced
3. Install LSPosed zygisk module
4. Install Hide My Applist
5. Install Teams and Company Portal but do NOT run them yet
6. Go to the denylist in Magisk and add Play Store, Google Play Services, Google Services Framework, Company Portal and Teams and tick all the sub-menu options for all of them. Note that if you reinstall Company Portal and Teams, the sub-menu items will need to be re-ticked in the denylist again
7. Configure the Hide My AppList to use a blacklist to hide root from the above mentioned apps
8. Reboot phone
9. Do NOT sign into Company Portal. Just sign into Teams. Check the Hide My Applist logs and it should show logs for Company Portal and Teams. Teams will call the Company Portal app in the background to do the root check.
10. If you did all the above correctly, then Teams should be working fine
Thanks, this is the only solution that worked for me with latest versions of Teams and Outlook.
 

welshyoot

Senior Member
Jan 23, 2011
89
3
OnePlus 6T
Does this still work as of today? I've tried everything and can't get this to work.

- I'm on Android 13, using MIUI.eu
- SafetyNet passes perfectly
- Using Zygisk without denylist enforced, but configured correctly for Teams and Company Portal. All the submenu items are ticked. Have also done this for Google Play Store, Google Play Services, Google Services Framework, etc
- Magisk app hidden
- Using Shamiko
- Using Hide my Applist and configured it correctly, so that the Applist Detector shows everything as passed. Applied the template to Company Portal and Teams
- Removed work profile created by Company Portal and re-tried again

I'm able to get Company Portal to create the work profile, but when it reaches the stage to add my device to AAD, that's where it fails. Typically, it wouldn't let you even create a work profile if it has detected root on your device.

I've tried with the latest versions of Company Portal and Teams from Play Store, as well as older versions.


UPDATE:

OK so I got it working.

1. Uninstall Teams and Company Portal
2. Install LSPosed zygisk module
3. Install Shamiko Magisk module and make sure Denylist is not enforced
4. Install Hide My Applist
5. Install Teams and Company Portal but do NOT run them yet
6. Go to the denylist in Magisk and add Play Store, Google Play Services, Google Services Framework, Company Portal and Teams and tick all the sub-menu options for all of them. Note that if you reinstall Company Portal and Teams, the sub-menu items will need to be re-ticked in the denylist again
7. Configure the Hide My AppList to use a blacklist to hide root from the above mentioned apps
8. Reboot phone
9. Do NOT sign into Company Portal. Just sign into Teams. Check the Hide My Applist logs and it should show logs for Company Portal and Teams. Teams will call the Company Portal app in the background to do the root check.
10. If you did all the above correctly, then Teams should be working fine
This also worked for me after ages of pulling my hair out with it. Thank you!
 

dliedke1

New member
Jun 10, 2020
4
7
I managed to make it work with the following method:

  • Magisk hide activated
  • LSposed module
  • XprivacyLua module (LSposed)
On XprivacyLua, search for intune check them all:

View attachment 5839675


By these actions, you'll make XprivacyLua circumvent any actions requested from Microsoft Intune and no longer will get Outlook closing suddenly.

See if these steps above will work for you guys.
Amazing! The only way it worked!! Muito obrigado!! Thanks!

(edit: stopped working 😥)
 
Last edited:

Tandrios

Member
Apr 9, 2009
13
4
HTC Desire
Google Nexus 4
I used to have Magisk Delta, this worked fine. Since 2 weeks I started getting root detection by Intune, so far without a solution. I've tried the last 2 suggestions, but I still have issues.

I use Intune with Outlook. Does anybody have any suggestions?
 

Tandrios

Member
Apr 9, 2009
13
4
HTC Desire
Google Nexus 4
Normal Magisk 26103 and Shamiko, the default stuff

Thank you for your reply! However, this does not work for me. What I've enabled right now:

- Magisk 26103
- Shamiko 0.7.3 (174)
- USNF Displax Mod 2.4.0 - 1.3

Magisk app is hidden, all the Microsoft apps are hidden in Denylist (and Denylist is off for Shamiko). I work with Microsoft Intune & Outlook (and Authenticator for login).

I've deleted all the apps, installed everything again (and rebooted in the meantime) but when I authenticate Outlook, within a few minutes root gets detected.
 

reist

Senior Member
Does this still work as of today? I've tried everything and can't get this to work.

- I'm on Android 13, using MIUI.eu
- SafetyNet passes perfectly
- Using Zygisk without denylist enforced, but configured correctly for Teams and Company Portal. All the submenu items are ticked. Have also done this for Google Play Store, Google Play Services, Google Services Framework, etc
- Magisk app hidden
- Using Shamiko
- Using Hide my Applist and configured it correctly, so that the Applist Detector shows everything as passed. Applied the template to Company Portal and Teams
- Removed work profile created by Company Portal and re-tried again

I'm able to get Company Portal to create the work profile, but when it reaches the stage to add my device to AAD, that's where it fails. Typically, it wouldn't let you even create a work profile if it has detected root on your device.

I've tried with the latest versions of Company Portal and Teams from Play Store, as well as older versions.


UPDATE:

OK so I got it working.

1. Uninstall Teams and Company Portal
2. Install LSPosed zygisk module
3. Install Shamiko Magisk module and make sure Denylist is not enforced
4. Install Hide My Applist
5. Install Teams and Company Portal but do NOT run them yet
6. Go to the denylist in Magisk and add Play Store, Google Play Services, Google Services Framework, Company Portal and Teams and tick all the sub-menu options for all of them. Note that if you reinstall Company Portal and Teams, the sub-menu items will need to be re-ticked in the denylist again
7. Configure the Hide My AppList to use a blacklist to hide root from the above mentioned apps
8. Reboot phone
9. Do NOT sign into Company Portal. Just sign into Teams. Check the Hide My Applist logs and it should show logs for Company Portal and Teams. Teams will call the Company Portal app in the background to do the root check.
10. If you did all the above correctly, then Teams should be working fine
Works thnx
 
  • Like
Reactions: pocketrule

supermansaga

Senior Member
Mar 12, 2011
324
68
Thank you for your reply! However, this does not work for me. What I've enabled right now:

- Magisk 26103
- Shamiko 0.7.3 (174)
- USNF Displax Mod 2.4.0 - 1.3

Magisk app is hidden, all the Microsoft apps are hidden in Denylist (and Denylist is off for Shamiko). I work with Microsoft Intune & Outlook (and Authenticator for login).

I've deleted all the apps, installed everything again (and rebooted in the meantime) but when I authenticate Outlook, within a few minutes root gets detected.
Maybe try Hide My Applist v3.2 as well. It's on GitHub. I don't believe I have set it correctly though. Here is what I did. I otherwise haven't tried whitelist or blacklist for it.
Screenshot_20230719-114414.png
 
Added the following step in the tutorial because some were able to make it work by adding these steps:
- Delete data from the following Apps: Google Play Store and Google Play Services (update 19.07.2023)
- reboot your device

Edit:
The success rate for this tutorial is still very high. I have a total of 8 (!) Android devices where this tutorial works (tablets, smartphones, VMs, ...).

The problems that occur in individual cases, I can unfortunately either not understand or reproduce. Therefore, I am very sorry that I can not help you, but will continue to try my best to solve your problems.


If a step is not well enough documented or if you think that somewhere a detail to success is missing please let me know.

Despite everything: I wish you all that my tutorial leads to the goal.
 
Last edited:

supermansaga

Senior Member
Mar 12, 2011
324
68
Added the following step in the tutorial because some were able to make it work by adding these steps:
- Delete data from the following Apps: Google Play Store and Google Play Services (update 19.07.2023)
- reboot your device

Edit:
The success rate for this tutorial is still very high. I have a total of 8 (!) Android devices where this tutorial works (tablets, smartphones, VMs, ...).

The problems that occur in individual cases, I can unfortunately either not understand or reproduce. Therefore, I am very sorry that I can not help you, but will continue to try my best to solve your problems.


If a step is not well enough documented or if you think that somewhere a detail to success is missing please let me know.

Despite everything: I wish you all that my tutorial leads to the goal.
Sometimes it could be due to the unique setup by the IT at their company. I was lucky.
 

rejectedjs

Senior Member
Apr 1, 2012
449
145
Can confirm @chaoscreater's method works perfectly running AOSPA (A13) on my OnePlus 9 Pro rooted with Magisk.

For anyone confused about the Hide My Applist setup, in the app, just tap App manage and search the listed apps and click "Enable hide", nothing else. Don't know how long this will continue to work but I'm happy it works at all. Thanks!
 
  • Like
Reactions: pocketrule

aniketdas

New member
Jan 10, 2018
1
2
Xiaomi Redmi Note 7 Pro
Update 04.01.2023: I've added shamiko magisk module to make this tutorial work again.
Update 19.07.2023: Some were able to make it work by cleaning the data of Google Play Store and Google Play Services. Added.


This question was asked many times and often all the answers did not work:
How do I get Magisk to work with Microsoft Apps like Microsoft Teams, Microsoft Outlook etc (protected by Microsoft Intune)?

With Magisk 24.1 it is finally possible to bypass the protection of Microsoft Intune. Here are the instructions on how to proceed. The solution requires root!
- First of all you need the latest Magisk version (24.2 or higher).

After installation select:
- Settings -> Hide the Magisk app : Select a new name of your choice (I use 'MM' for 'Magisk Manager')
- After Magisk has been hidden open 'Settings' and enable 'Zygisk (Beta)'
- uncheck Force Denylist in Magisk settings
- Select 'Configure DenyList'
- Use the magnifying glass and search for "Microsoft". You will find "Company Portal" (also known as Microsoft Intune).
Important: Expand the view by clicking on the entry. You will see something like this:
View attachment 5536587
- Now, with the expaned view, click the entry. It will look like this:
View attachment 5536595
- Repeat these step (first expand, then clicking the button) on each other Microsoft App - e.g. Microsoft Teams, Microsoft Outlook, ...
Important: If you do not expand the view it will not work!

Now, to make sure that this solution is really working ....
- Install YASNAC - Yet Another SafetyNet Attestation Checker from the Google Play Store.
- Run the SafetyNet Attestation on YASNAC
When it fails is shows something like this:
S-XC-3lnvkR7nblwC2dDZh0uv_Lk2AskoGUgmAS7Ccta5Txk5vC6RSkVbQ3zGXKwCpo=s0


Fix Basic integrity
- To fix the Basic integrity you need to install the latest Universal SafetyNet Fix from Github.
- Download the ZIP and install it as a module in Magisk (24.1 or higher).
- Reboot again and restart the YASNAC - Yet Another SafetyNet Attestation Checker. It should now pass (at least) the Basic integration.

If this is not the case you might also need to fix your CTS profile match. You can resolve this by doing the following steps:
- Download and install the latest release of MagiskHide Props Config from Github in Magisk as a Module.
- Restart your Phone!
- Launch a Terminal of your choice (e.g. Termux, Android Terminal Emulator, ...).
- Type 'su' (enter) and agree to the root dialog.
- Now type 'props' (enter) ...
... select '1' for Edit device fingerprints
... select 'f' for Pick a certified fingerprint
... select a vendor of your phone (e.g. Xiaomi, Poco, Google, Samsung, Oneplus ...)
... select your phone (if available) or a phone which is next to your phone with your installed Android version (for example 9,10,11).
- After selecting the fingerprint for your device, and when the program ends.

Now, lets continue:
- Install Shamiko and make sure that you uncheck Force Denylist in Magisk settings (update 04.01.2023)
- Delete data from the following Apps: Google Play Store and Google Play Services (update 19.07.2023)
- reboot your device

After reboot another check of YASNAC - Yet Another SafetyNet Attestation Checker should the look like this:
ufTYzRDcL2yWF46hikmY4FirIxP4ZsDENWO3Tokb9pEIEDAV7iS4xh6De9wfk4fWzA=w1837-h977-rw


Important:
Once YASNAC shows Pass on Basic integrity and CTS profile match you can use any Banking App (e.g. Google Pay, N26, DKB, Sparkasse, Revolut, bunq, <whatever>) by repeating the inital steps for each of these Apps and it should not detect root. You might need to clear the data before the app stops complaining about a rooted device (example Google Pay).



If you find this tutorial helpful please leave a like for this post - thanks in advance.
Not working tried all the ways, in YASNAC everything is passed. But still in Intune it failed.
 
  • Like
Reactions: TheSaarth and mcon1

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Hi, just sharing my setup here. I'm able to use Teams with Intune v5.0.5981.0.
    • Magisk Alpha 26301, not hidden/renamed
    • Zygisk ON
    • Enforce DenyList OFF
    • Teams and Intune in DenyList, all boxes checked
    • HMA 3.2, blacklist template hiding Magisk and HMA, applied on Teams and Intune
    Modules :
    • USNF 2.4.0 MOD 2.0 by Displax
    • Shamiko 0.7.3
    • LSPosed 1.9.1
    Most important things I noticed are Shamiko, and hiding the Magisk app (either using HMA or Magisk's own rename hiding). The others don't seem to matter too much, but I've written all down just in case they do matter. I've tried it on Delta and Alpha, both work.

    Things to note:
    • Remember to remove and reinstall modules when changing Magisk forks
    • Clean Intune and Teams data every attempt
    • Reboot phone after making changes in HMA
    3
    Edit: forgot to quote previous posts. Sorry for double posting below

    Temporary workaround:
    Remove your work profile completely.
    Uninstall company portal from main profile
    Install earlier version (5.0.5926) of company portal from apk mirror or backup if you have
    Open magisk and reinforce deny list for all tick marks of company portal
    Open play store and disable auto updates of company portal
    Setup working profile
    Open working profile play store and disable auto updates in there
    All apps which are present on company portal should also be downloaded to main (or do they already co exist) and those apps should be added to magisk deny list.
    2
    After updating some Microsoft apps, Root is now being detected on my Pixel 7 Pro and Pixel Tablet. I am going to try rolling back Intune to an earlier release. Anyone seeing corp apps now detecting root?

    EDIT: Rolling back Intune Company portal to 5.0.5926 allows me to prevent corporate apps from detecting ROOT.

    Edit2: What piece will need to be updated to get around the latest detection? Is it Shamiko or USNF? I just updated Magisk.
    2
    Same thing for me on my Pixel 7 Pro this morning - the intune app itself reports the device as being compliant, but the usual apps I use (Slack and Outlook) both report the phone as being rooted.

    Have tried clearing data for all the work apps with no success. Intune is managed in a work profile, so not sure what options I have for downgrading/locking the version given it's all managed in a separate profile. Also tried updating shamiko and usnf with no luck.

    Any advice here?

    Same here for me. I've downgraded all and wiped data of my Microsoft apps and reinstalled shamiko, play integrity fix, re-configured both hma and denylist. I'm not sure where to go from here.
    Temporary workaround:
    Remove your work profile completely.
    Uninstall company portal from main profile
    Install earlier version (5.0.5926) of company portal from apk mirror or backup if you have
    Open magisk and reinforce deny list for all tick marks of company portal
    Open play store and disable auto updates of company portal
    Setup working profile
    Open working profile play store and disable auto updates in there
    All apps which are present on company portal should also be downloaded to main (or do they already co exist) and those apps should be added to magisk deny list.
    2
    no, because I heard jailbreaking iOS is of a much slower progress. One won't be able to use the latest iOS 16.6.1 if not iOS 17 beta? Prove me wrong. Even if jailbreakable at 16.6, I double it could survive the new onslaught from intune company portal.
    Just buy your iPhone. I don't care. You have to prove yourself wrong. It's your money.
  • 32
    Update 04.01.2023: I've added shamiko magisk module to make this tutorial work again.
    Update 19.07.2023: Some were able to make it work by cleaning the data of Google Play Store and Google Play Services. Added.


    This question was asked many times and often all the answers did not work:
    How do I get Magisk to work with Microsoft Apps like Microsoft Teams, Microsoft Outlook etc (protected by Microsoft Intune)?

    With Magisk 24.1 it is finally possible to bypass the protection of Microsoft Intune. Here are the instructions on how to proceed. The solution requires root!
    - First of all you need the latest Magisk version (24.2 or higher).

    After installation select:
    - Settings -> Hide the Magisk app : Select a new name of your choice (I use 'MM' for 'Magisk Manager')
    - After Magisk has been hidden open 'Settings' and enable 'Zygisk (Beta)'
    - uncheck Force Denylist in Magisk settings
    - Select 'Configure DenyList'
    - Use the magnifying glass and search for "Microsoft". You will find "Company Portal" (also known as Microsoft Intune).
    Important: Expand the view by clicking on the entry. You will see something like this:
    before.png

    - Now, with the expaned view, click the entry. It will look like this:
    after.png

    - Repeat these step (first expand, then clicking the button) on each other Microsoft App - e.g. Microsoft Teams, Microsoft Outlook, ...
    Important: If you do not expand the view it will not work!

    Now, to make sure that this solution is really working ....
    - Install YASNAC - Yet Another SafetyNet Attestation Checker from the Google Play Store.
    - Run the SafetyNet Attestation on YASNAC
    When it fails is shows something like this:
    S-XC-3lnvkR7nblwC2dDZh0uv_Lk2AskoGUgmAS7Ccta5Txk5vC6RSkVbQ3zGXKwCpo=s0


    Fix Basic integrity
    - To fix the Basic integrity you need to install the latest Universal SafetyNet Fix from Github.
    - Download the ZIP and install it as a module in Magisk (24.1 or higher).
    - Reboot again and restart the YASNAC - Yet Another SafetyNet Attestation Checker. It should now pass (at least) the Basic integration.

    If this is not the case you might also need to fix your CTS profile match. You can resolve this by doing the following steps:
    - Download and install the latest release of MagiskHide Props Config from Github in Magisk as a Module.
    - Restart your Phone!
    - Launch a Terminal of your choice (e.g. Termux, Android Terminal Emulator, ...).
    - Type 'su' (enter) and agree to the root dialog.
    - Now type 'props' (enter) ...
    ... select '1' for Edit device fingerprints
    ... select 'f' for Pick a certified fingerprint
    ... select a vendor of your phone (e.g. Xiaomi, Poco, Google, Samsung, Oneplus ...)
    ... select your phone (if available) or a phone which is next to your phone with your installed Android version (for example 9,10,11).
    - After selecting the fingerprint for your device, and when the program ends.

    Now, lets continue:
    - Install Shamiko and make sure that you uncheck Force Denylist in Magisk settings (update 04.01.2023)
    - Delete data from the following Apps: Google Play Store and Google Play Services (update 19.07.2023)
    - reboot your device

    After reboot another check of YASNAC - Yet Another SafetyNet Attestation Checker should the look like this:
    ufTYzRDcL2yWF46hikmY4FirIxP4ZsDENWO3Tokb9pEIEDAV7iS4xh6De9wfk4fWzA=w1837-h977-rw


    Important:
    Once YASNAC shows Pass on Basic integrity and CTS profile match you can use any Banking App (e.g. Google Pay, N26, DKB, Sparkasse, Revolut, bunq, <whatever>) by repeating the inital steps for each of these Apps and it should not detect root. You might need to clear the data before the app stops complaining about a rooted device (example Google Pay).



    If you find this tutorial helpful please leave a like for this post - thanks in advance.
    6
    Alright, I'm fairly confident now the problem seems to be the new Play Integrity API from Google, and not some nefarious new root tracking method from MS, which makes a lot more sense.

    More info on PI API here: https://forum.xda-developers.com/t/...tynet-fix-2-3-1.4217823/page-90#post-87188299

    Basically what is happening is that GMS is checking for the highest level of system integrity available on your phone. If your phone fingerprint (model+OS) supports hardware-backed authentication, the check will fail if that isn't returned intact. If your phone only supports software-level integrity checking, that is what gets returned.

    It appears Company Portal is now checking for Play Integrity, and many more root-secure apps, like your banking ones, are sure to follow.

    @Displax published a USNF mod that injects an old Pixel XL fingerprint into GMS using Zygisk which avoids changing global props and causing issues elsewhere: https://forum.xda-developers.com/t/magisk-module-universal-safetynet-fix-2-3-1.4217823/post-87198517.

    Usage:
    1. Delete/disable/reset MagiskHidePropsConfig (if installed).
    2. Just install it over old Universal SafetyNet Fix and reboot device.

    This means PI API will sign off on device integrity at the software level, which you can check using the Play Integrity API Checker from @1nikolas: https://forum.xda-developers.com/t/...cussion-thread.3906703/page-130#post-87182459. A more in-depth version that also checks for hardware-backed authentication should be available in the Play Store soon.

    On *top* of all this, it seems Company Portal was detecting the zygisk process in memory. Shamiko 0.5.2 seems to block this by also hiding the zygisk process. HMA doesn't seem to be necessary so far but I'm monitoring.

    Doing this my phone has been stable on Company Portal 5.0.556.0 for over 24h through reboot and overnight charge.

    It's not clear yet how fragile Displax's USNF mod solution will be, hopefully this issue will be incorporated into future USNF releases. But absolute hardware-backed checks may be only a few years down the line and will likely make hiding root near impossible.

    Hope this helps some others.
    5
    It seems to be resolved with yesterday's update of Shamiko to 0.5.2
    After yesterday's update the settings are working fine. Will update in case the issue resurface.
    Download from Github: https://github.com/LSPosed/LSPosed.github.io/releases - just in case somebody is searching for it as I did... :cool:
    5
    Here to report that I managed to get the latest Intune and Teams from Play Store working with:
    • Universal SafetyNet Fix v2.3.1
    • Shamiko v0.5.2 (120)
    1. Add Intune and Teams to DenyList (make sure all toggles are turned on)
    2. Turn OFF Enforce DenyList
    3. Reboot
    4. Force stop / kill those apps (not sure if this is needed after a reboot, but just to be sure)
    5. I didn't need to clear the apps' data, but you can give that a try
    6. Hide the Magisk app in Magisk's settings
    Will update this post again if this suddenly stops working.
    4
    It seems to be resolved with yesterday's update of Shamiko to 0.5.2
    After yesterday's update the settings are working fine. Will update in case the issue resurface.