Set default app associations via Windows 10 MDM

This blog post will be about setting default app associations, or file type associations, on Windows 10 devices. Starting with Windows 10, version 1703, it’s possible to set the default app associations via Windows 10 MDM. In this post I’ll briefly go through this setting and I’ll show how to configure the setting via Microsoft Intune hybrid and Microsoft Intune standalone. I’ll end this post by showing the end-user experience.

Configuration

Starting with Windows 10, version 1703, a new setting was introduced that allows an administrator to set the default file type and protocol associations. When set, default associations will be applied on sign-in to the PC. Every sign-in. In other words, the end-user can make adjustments. However, once the end-user signs-out and signs-in again, the default associations will be applied again. This does require the PC to be Azure AD joined.

Get the required information

Let’s start by getting the required information to configure the custom OMA-URI setting. The required OMA-URI setting is available in the Policy CSP.

OMA-URI setting: ./Vendor/MSFT/Policy/Config/ApplicationDefaults/DefaultAssociationsConfiguration

The required OMA-URI value requires the following steps to get it in the correct format.

1 On Windows 10, version 1703, navigate to Settings > Apps > Default apps and configure the required default apps;
2 Open Command Prompt and run DISM /Online /Export-DefaultAppAssociations:DefAppAss.xml to export a required app associations file;
3

Base64Encode_orgOpen your favorite Base64 encoder and encode the content of DefAppAss.xml to Base64 format.

In my example I was only interested in switching to Internet Explorer as the default browser and keeping Microsoft Edge as the default for PDF reading. That allowed me to remove all the remaining content from the DefAppAss.xml. Then I used base64encode.org to easily encode the remaining content of the DefAppAss.xml to Base64 format (see screenshot).

4 The result in Base64 format is the OMA-URI value.

Configure the setting

After getting the required information, let’s have a closer look at the configuration of the setting. The setting can be used in Microsoft Intune hybrid and Microsoft Intune standalone, by using the configuration guidelines shown below.

Environment Configuration guidelines
Microsoft Intune hybrid

DefAppAss_MIhThe configuration in Microsoft Intune hybrid can be performed by starting the Create Configuration Item Wizard in the Configuration Manager administration console. Make sure to select Windows 8.1 and Windows 10 (below Settings for devices managed without the Configuration Manager client) on the General page and to select Windows 10 on the Supported Platforms page. Now select Configure additional settings that are not in the default setting groups on the Device Settings page and the configuration can begin by using the earlier mentioned OMA-URI setting and value.

Once the configurations are finished, the created configuration items can be added to a configuration baseline and can be deployed to Windows 10 devices.

Microsoft Intune standalone (Azure portal)

DefAppAss_MIsThe configuration in Microsoft Intune standalone, in the Azure portal, can be performed by creating a Device configuration. Create a new profile, or add a row to an existing custom profile. With a new profile, make sure to select Windows 10 and later as Platform and Custom as Profile type. In the Custom OMA-URI Settings blade, add the custom settings by using the earlier mentioned OMA-URI setting and value.

Once the configurations are finished, the profile can be saved and can be deployed to Windows 10 devices.

Note: This post is based on the custom OMA-URI settings configuration. At some point in time this configuration can come available via the UI of Microsoft Intune standalone and/or hybrid.

End-user experience

Now let’s end this post by having a quick look at the end-user experience. Below on the left is the default Windows configuration and below on the right is the applied policy with the custom app associations. I know that this doesn’t provide a lot of information. However, it does show one important fact, which is that there is nothing preventing the end-user from making adjustments. The end-user can still make adjustments, but those adjustments will be reverted during the next sign-in.

DefaultBrowser_Edge DefaultBrowser_IE

More information

For more information about the Policy CSP, please refer to this article about the Policy CSP.

69 thoughts on “Set default app associations via Windows 10 MDM”

  1. Question on this – I am developing a Guest \ Kiosk style modern managed device – I have set this in our policy to default to Chrome. As I am using the new shared PC Guest account, which generates a new profile on each login, I am not seeing this default being set. Any thoughts?

    Reply
  2. We need the profile to be cleared per use, and the machine to log out after 15mins (client requirements). I am using the new Guest mode with profile management enabled to clear out the local profile on log off. The machine is public use and needs to have many applications available and the machine mostly useable (full office 365 suite installed). If you have any ideas on best accomplishing this I’m all ears 🙂

    Reply
  3. How do we set a default site in chrome (its in kiosk mode). We got kiosk mode to work with it adding a chrome shortcut to the desktop but need it to be a specific site.

    Reply
  4. Hi Peter

    Great guide.
    Weird problem that I’m running into is that neither the export or if I display them with get-defaultappassociations display the real associated apps. It just returns Edge for PDF and mail for mail.

    Any ideas?

    Reply
  5. Hi Peter

    No, apparently when I used elevated PS it used the admin account’s ‘profile’ which I elevated with, which ofcourse was blank and therefor default.
    After making the user, that had the right settings, local admin, it worked.

    Reply
  6. Hi,

    In the new release it’s now possible to push the XML directly into de Intune MDM without conversion by Bash64. Maybe handy to know 😉

    Reply
  7. This might be a dumb question, but I can’t find the information anywhere as to where this command outputs the .xml file?

    Reply
  8. I am trying this out and I seem to be getting hung up on the export results. I need to make an association for .text files (not .txt files) for excel. We have an application that will only export to .text and not anything useful like .csv… I can make the change on my system, in settings, but i do not see it populate in the list when I either export or just Get-DefaultAppAssociations. Any ideas as to why I cant see this association in the output of my command? Any help would be greatly appreciated, thanks.

    Reply
  9. Hi Peter,

    Thank you so much for sharing such a valuable information.
    Could you also please guide about how we can place shortcuts of specific sites in favorites and on desktop so that user can easily access those sites?

    Best Regards

    Reply
  10. I can’t use above logic to set outlook as default mail client app as you mentioned it is IE but I tried same logic for Outlook. any thoghts

    Reply
  11. This blog post helped me apply default apps to a fleet of laptops with minimal effort. Thanks for sharing with the community!

    Question – would the raw XML output of DISM work as-is without base64 encoding, if the OMI-URI’s value datatype was set to “String (XML)” instead of just “String”?

    Reply
  12. Hi Peter,

    Really useful post, thank you.
    I used this with adobe reader for PDFs. After a reboot however, I found that the app association was reset to edge. On the subsequent reboot though, it changed back to adobe and has been okay since. Is this something you have seen before?

    Thanks

    Reply
    • Hi Davide,
      Not by using this method. With this method you can’t control the refresh behavior, as that’s controlled by the CSP. You might want look at something like a custom script.
      Regards, Peter

      Reply
  13. Thank you for the tutorial. – This one is still up to date?
    Is it possible to let the user set the apps “once”?

    Reply
  14. Hi Peter,

    I applied your technique and it works well, but am noticing something strange on our machines. If users previously had a .URL shortcut on their desktop, when they open it, they get a screen asking them to select a default application, with “Internet Browser” as the primary option.

    Any suggestions to prevent this screen if we are already defining the default?

    Thanks,
    Mike

    Reply
  15. Hi Peter,
    Really appreciate helpful article.
    I have one question.

    Is it possible to implement like user can change the default apps if they want?
    I’d like to set chrome as default for every device, but also have flexibility for users.

    Regards,
    Keita

    Reply
  16. Hi Peter

    My app association for .pdf was Acrobat but my pdf files were still marked as Edge, tried restarting a few times and the app association just reverted to Edge.

    Any update to fix this?

    This was my XML before I encoded it with Base64:

    Reply
  17. Hi Peter
    This was working fine until a few PC’s have now reverted to Chrome instead of Adobe for PDF. Strange that only say 10 out of 50 PC’s are doing this. Any ideas?

    Reply
  18. Hi Peter,
    Nice article for set-default-app. I do have another question on similar track.
    For Example, The company laptop is provisioned using Intune (Auto pilot type set up), but the user to whom its assigned is also the local admin so he/she can add/remove softwares etc. What is the best way for Intune to stop the user wiping out the Laptop. is there any way we can implement this via intune so that user can add/remove software but not able to totally wipe the computer.
    Thanks
    Jd

    Reply
  19. I’m trying to Add another default App association to my existing custom configuration profile, which is for Outlook to be the default mail app, as i have done one for microsoft Edge.

    When i try to Add it intune says ‘table already contains this entry’
    but even though the name and string are different.

    Reply
  20. Thanks for this post, Peter. If I’m not mistaken, this will only run one time. Is that correct? We’re finding that the default PDF reader gets switched from Adobe Reader to Chrome or Edge each time one of those apps are updated. Do you know how we could use proactive remediations to accomplish this on an hourly basis instead of just once?

    Reply
  21. Hello,

    I now implement the default apps and with that I have also determined that Adobe Reader DC should always open the extension .pdf but it does not do this and keeps returning it to Microsoft Edge as the default application – In the .xml file it is well marked. anyone have an idea how to solve this?

    Reply
  22. Hi Peter,

    Great post as always.

    We have this working well with PDF files. But today we tried adding a second Intune Configuration Policy to add some other defaults for another program (and assigned to another group). We are finding if a device happens to have the two policies assigned, the second one fails with a policy conflict. The 2 xml inputs we are using do not have the same file extensions refenced, so I was expecting them to cumulatively add the default file extensions but seems this is not the case. Is this policy limited to one instance per device?

    We don’t really want to combine the 2 policies as they target different device groups.

    Thanks.

    Alex.

    Reply
  23. Hello!

    How should we setup this up properly with autopilot, the configuration profile runs before the apps install so it doesn’t work for us on new auto pilot builds, only machines that are already setup.

    Any ideas?

    Reply

Leave a Reply to Visio Chambers Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.