Troubleshooting Intune Endpoint Privilege Management

Today I want to show you how you can troubleshoot issues with Intune Endpoint Privilege Management (EPM) and will try a little deep dive in how it works.

Policies

Let’s start with the basics, in order to get Intune EPM started, we need to assign at least an EPM Settings policy from Intune to the device. In the settings policy we will configure how EPM should behave, in my case I want to use the support approved flow as fallback, if someone requests an elevation for an App that does not have a specific rule assigned:

Additionally, it makes sense to create and assign a rules policy, where we will configure which Apps have specific rules set, to change the behavior of EPM for these Apps. For example, Testapp1.exe should be automatically elevated and child processes will only be elevated if there is a separate rule configured:

Testapp2 for example should only be elevated if the user enters a business justification, but this time all child processes will be automatically elevated (this can lead to have processes elevated that you don’t want to be (e.g. run a cmd.exe from the File open dialog of your app), so be careful with this setting, only use it, when it is absolutely necessary.)

Enrollment

Registry

Now that we have configured everything that we need, we should see a few things happening on the client. The first thing is the “dual enrollment” where the device will do an additional MDM server enrollment to the service that is used for Intune EPM. You can see this in the registry in the “Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Enrollments\” hive, that now additionally to the usual Intune enrollment key (ID is unique per device):

We should now see the enrollments key for the “dual enrollment” Intune service that EPM uses:

Task Scheduler

Additional to the registry, we should also be able to see the additional enrollment id in the Task Scheduler (must be started as admin) in: “Microsoft -> Windows -> EnterpriseMgmt. Here the tasks from the “normal” Intune enrollment. You can see the “Schedule #3” runs every 8h which matches the Intune check in cycle.

Additionally, we can now see the additional folder with the same id as in the registry containing the tasks for the “EPM enrollment”. You can see the “Schedule #3” is executed more frequently, on my test device all 3h50min.

Event Viewer

We can also see the enrollment in the Event Viewer under “Applications and Services Logs -> Microsoft -> Windows -> DeviceManagement-Enterprise-Diagnostics-Provider -> Admin
If there are issues with the enrollment, you should see error messages like this one, showing issues with MDM Declared Configuration:

Intune EPM Agent

Now that we looked into the dual enrollment, let’s have a look at what should happen next. The installation of the Intune EPM Agent. It will be installed in a similar way that the Intune Management Extension (IME) gets installed. Just like when we first assigned for example a Win32 App, the IME gets installed automatically using the MSI Line-of-business App flow of the MDM Stack:

Once we assign the EPM Settings Policy and the “dual enrollment” started, we can see the EPM Agent is installed using the same method:

From here on, it’s really just a like “normal” MSI LOB App, which gets installed, has an uninstall string in the registry:

And gets installed to C:\Program Files\Microsoft EPM Agent:

Logs and Troubleshooting

PowerShell Module

If we made it this far, and the device enrolled successfully and the EPM Agent got installed, we can start looking in the logs to start troubleshooting. To see if our policies got applied to the device, we can use the PowerShell module provided with the EPM Agent itself. This module is delivered in the “EPMTools” Folder within the application folder together with a helpful readme.md file that explains how to use the module:

Since the module can get changed with every update of the EPM Agent, I will not get into too much detail, just a few examples of what you can do with it. First you have to import the EpmCmdlets.dll module into PowerShell, then we can start:

We can for example lookup the settings for a specific app (Testapp1.exe from the demo) and see what is configured for it:

And much more…

Logfiles

In the Install folder we can also find all logfiles from the EPM Agent, where we can find all kind of information about the Agent, the driver and the overall health of the service:

Rule Files

What can we do, if we don’t want or can use this module? Well, all the data is available in clear text as well. All Policies are stored as .dat files in the Policies Folder of the EPM Agent:

We can open these in e.g. notepad and see all our policies in a json format and again we can find our testapp1.exe

Since these policy files are conveniently formatted as json we could easily create our own script, to read all policy settings if we want…

Registry

Additional to these rule files, there is a corresponding entry in the registry for each of these policy files and for each app that will be used by the PowerShell module for the file lookup:

As you can see, all policy files are stored with a base64 binary encoded SHA 256 File hash, file length and a matching signature, so a local file manipulation should not be so easy 🙂

Common errors

Now that we have some general info available, on how to troubleshoot the EPM Agent itself, I will show you a few common errors or issues that I saw with the current state. Check out the official Microsoft Docs for a more up to date list of things to consider: https://learn.microsoft.com/en-us/mem/intune/protect/epm-deployment-considerations-ki?WT.mc_id=MVP_317638

Support approved (primary user)

If you get this error message in a support approved flow, make sure the logged on user is the primary user of the device:

Once the primary user is modified to the currently logged on user, you will be able to send the request:

File from Internet

If you try to elevate a file, that has the “file from Internet” flag in its alternative data stream, you will see an error:

If you want to run this app, you can either remove the flag from the file properties:

Or remove it using the PowerShell “unblock-file” command:

Now you can run the App without issues.

Support approved (slow)

If you requested a support approved elevation, someone approved it, but nothing seems to happen, you can manually trigger a sync and you should relatively immediately the toast notification, that our request was approved.

And you can finally run the app.

EPM User account

One last thing to mention, especially compared to other EPM Solution, the Intune EPM Agent is not modifying the token of the current user, but instead it uses a virtual account to run the elevated apps. You can see this account under C:\Users once you enable hidden folders. These Accounts follow the naming schema “Domainname_Username_$”:

Keep in mind, that for all elevate apps, this would be the “current user”, so if setups are copying files to the current user appdata, this will end in this user account and not your “normal” user account. So, a whoami in cmd will output this user account. (Notice, they are still calling Intune “mem” :))

This will also mean, you cannot access network resources that authenticate through e.g. kerberos from within these sessions right now.

Conclusion

Hopefully this deep dive, can help you working with Intune EPM. So many new or different things come with Intune EPM, the additional enrollment, the EPM Agent itself and a lot more smaller things, so in my opinion it makes sense to have a look in how it works, in order to be able to troubleshoot issues here. If you have any additional things that I should cover, let me know in the comments below.


Posted

in

by

Tags:

Comments

17 responses to “Troubleshooting Intune Endpoint Privilege Management”

  1. Mark

    Dear Mike

    We have published for testing 2 elevation rules policies for 2 different user groups. We also published elevation setting policy to enable EPM for the same 2 users groups. Groups include users and not machines.
    I can see on the machine , clientsetting and elevation rules. Powershell policy is set to start automatic. when i run powershell it starts as administrator. however i do not see elevation option when i right click the exe file. i deployed additional setting rule in same rule with business justification for pwsh.exe, however as I cannot see the elevate option when right clicking i cannot get it to work. I do see in evenvwr, the 2451 errors. Also powershell frequenly pops up and closes. And sproadically i see than error with something went wrong 0x87E00804. I cannot find anything related. Would you happen to know what this issue can be?

    Thanks

    1. Hi, do you by any chance have some policies in place, that could block an msix installation? The Shell Extension to run something with EPM is getting installed by the EPM Agent from “C:\Program Files\Microsoft EPM Agent\EPMShellExtension\EpmShellExtension.msix” and gets loaded via the “EpmShellExtension.dll” from the same folder. Maybe something blocks this installation? You can also try to go through the Logs in the EPM Folder, especially in the EPMService.log (I would recommend a tool like cmtrace to make the logs more readable)

  2. Andrea

    Is the EPM User account (“Domainname_Username_$”) meant to be member of local Admins ? What if it’s not (say b/c you have Intune or GPOs Settings like Restricted Groups or similar to replace members of local “Administrators”).

    1. It will not be visible there, but Rudy showed in his article, that it will create issues, if you for example block the EPM User from local logins:
      https://call4cloud.nl/interactive-logon-epm-0x80004003/

  3. Norlan

    Hello Mike, do you have by any chance documented what is the error reflected when ssl/tls inspection block EPM policy rules and agent deployment? what logs should I look into? check https://learn.microsoft.com/en-us/intune/intune-service/protect/epm-deployment-considerations-ki#endpoint-privilege-management-doesnt-receive-policy-when-i-use-a-ssl-inspection-on-my-network-infrastructure

    1. Hi, I haven’t seen it myself, but I think the Agent deployment itself could still work, as it is delivered through the “old” MSI LOB way. You can see that in the registry under: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EnterpriseDesktopAppManagement\S-0-0-00-0000000000-0000000000-000000000-000\MSI
      For the MMP-C Enrollment itself, I would have a look into EventVwr into the Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider Logs, I would expect to see an error there.
      Rudy also has some great articles about MMP-C on his blog, that could be helpful for you: https://call4cloud.nl/epm-enrollment-mmpc-mmp-c/

  4. Jesnar Miranda

    I encountered an error when i try to elevate access an installer. it says “Your Organization doesn’t allow you to run this app as administrator” with error code 0x80070005

    1. I would check if the rule arrived on the client, if yes, try with a filehash rule rather than a signer rule, depending on how the installer was singned, there could be issues detecting the signer correctly. A filehash rule should always work as long as the installer file matches the fielhash.

  5. Frida

    Hi, thanks for the article!
    Do you have any suggestion on where to start troubleshooting when you get the event id 2451 as you’ve shown in the article? I’ve read through Rudys article that you mentioned but I’m still stuck on what to actually do in order to solve it. I’m getting this on the 2 test machines that I’ve tried deploying EPM to. Event ID 2451 and no EPM folder. It’s like it’s not even attempting to install anything. We do have AppLocker active but there’s nothing in the AppLocker log.

    1. Hi, I would first check if the dual enrollment works, my first look would go into the Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider/Enrollment Logs to see if the enrollment fails for some reason, also check in Task Scheduler if the tasks for the MMPC Enrollment were created, only after this works I would check why the Agent does not get installed as it will definitely wait for the enrollment first.

      1. Frida

        Hi,
        Thanks for the quick response. I completely missed your reply until now. Checking in the Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider/Enrollment Logs i have 0 warnings, errors etc. Everything looks OK. Not sure what to look for in the task scheduler. I can see in Microsoft\Windows\EnterpriseMgmt 2 folders that match up with unique guid in the registry for the enrollments. It looks the same as your picture with Schedule #3 running more frequently on one of them.

        Here is where I’m completely stuck since I don’t know where to troubleshoot further.

        I’ve had the policy running now for 1,5 months and the clients themselves have been enrolled in Intune since this spring. Can AppLocker or ASR rules be the culprit? I haven’t seen anyone mentioned this. However nothing is ever triggered in the AppLocker log. I’ve tried switching the EPM policy to target users instead of devices and vice versa but made no different. Still the only thing that seems to log is the 2451 in DeviceManagement-Enterprise-Diagnostics-Provider -> Admin with result 0x8004100E and “UNknown Win32 error code 0x8004100e.

        1. Hi, this sounds to me like the dual enrollment itself worked, but for whatever reason the EPM Agent did not get installed, this could have been blocked by AppLocker or WDAC if configured wrong, but can you check in the registry Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EnterpriseDesktopAppManagement region in which state the MSI LOB App installation currently is (should be InProgress). The error 0x8004100E (WBEM_E_INVALID_NAMESPACE) that you see would indicate to me, that the MDM Stack tries to add the policy into WMI, but since the EPM Agent is not installed, the WMI Class does not yet exist. Maybe you can try to manually install the MSI on a testdevice to see what would happen…

          1. Frida

            Thanks again for the reply. I’ve checked the registry above but not sure if it is present actually.

            I can see the IntuneWindowsAgent listed and the InventoryAdaptorPackaging.msi. Not sure if the last one is the Device Inventory from Intune or the EPPM agent? If not, the EPM agent is not listed.

            Do you have a link or anything from where it can be downloaded? It could be that we would have to force deploy it that way, but I’m worried that it won’t be kept up-to-date if there’s some issue regarding this.

            We do have AppLocker configured but there’s nothing in the Event Log indicating a block, if it where to block though (even though it doesn’t seem to log it), which directory should it be trying to install the program from?

          2. Hi, the most recent version seems to be downloaded from: https://epmagent.manage.microsoft.com/epmagentpeeus/epmagentmsi/26.7.29.2000/EPMAgent.msi (https://mikemdm.de/wp-content/uploads/2026/08/grafik-57.png)
            And yes, even if this works, this is not a solution as it will most probably not update itself in the future, but we at least see if everything else works as expected and we “just” need to troubleshoot the LOB App install or if there is more wrong.

            From Rudy’s blog I think the App should be installed from “C:\Windows\system32\config\systemprofile\AppData\Local\mdm”
            https://call4cloud.nl/download-retrieve-lob-apps-win32-apps-from-intune/

          3. Frida

            Thanks once again.
            I tried installing it on one of the computers I’m testing with. The install itself works and I get the right-click context menu. However since the Intune settings are not applying it’s not working all the way.

            Looking at the EPM log in “C:\Program Files\Microsoft EPM Agent\Logs\EPM.log” I’m getting errors such as “Policies registry key not present ‘SOFTWARE\Microsoft\EPMAgent\Policies\SystemSettingRules’”, “LoadPolicyCacheFromRegistry: SOFTWARE\Microsoft\EPMAgent\Policies\SystemSettingRules : No policies present”, “Failed to read registry value ‘SchemaVersion’, ErrorCode: 0x80070002”

            Since we’re getting the same errors with the EPM agent not deplyoing even on pure Intune enrolled computers (not hybrid joined/co-managed) it feels like there’s some bigger issue at play here which I can’t find. Perhaps something to do with our Intune enrollment in general. We do have the mdm user scope in Intune set to All, so in my opinion it looks correct with all the URl’s etc.

            We’re leaning towards creating a Microsoft case since I feel there’s nothing more to troubleshoot that I can think of at least.

          4. Frida

            Another update. When testing yesterday after manually installing the app I was testing out the support approval mode. Now when trying “require user confirmation” it seems to work!

            It’s still unclear whether the app will keep itself updated. Not sure how to even keep track of how often these updates appear and whtether we have the latest one in the future.

          5. Interesting, have you ever tried to deploy another msi lob app though Intune to see if that would work in general? Win32 Apps are delivered though the Intune Management Extension and downloaded though Delivery Optimization, while msi lob apps (including the EPM Agent and the IME Agent itself) are deployed through the “old” mdm msi installation path and downloaded though BITS. Do you have any policies in place that could affect the download process (BITS or DO policies)? Otherwise I agree with you that a Microsoft Case could be the right decision at that point, maybe they can see more in the backend…

Leave a Reply

Your email address will not be published. Required fields are marked *