Close Menu
Peter Klapwijk – In The Cloud 24-7Peter Klapwijk – In The Cloud 24-7
    Facebook X (Twitter) Instagram
    Peter Klapwijk – In The Cloud 24-7Peter Klapwijk – In The Cloud 24-7
    • Home
    • Intune
    • Windows
      • Modern Workplace
    • macOS
    • Android
    • iOS
    • Automation
      • Logic Apps
      • Intune Monitoring
      • GitHub
    • Security
      • Passwordless
      • Security
    • Speaking
    • About me
    Peter Klapwijk – In The Cloud 24-7Peter Klapwijk – In The Cloud 24-7
    Home»Intune»Add a certificate to the Trusted Publishers with Intune without reporting errors
    Intune

    Add a certificate to the Trusted Publishers with Intune without reporting errors

    Peter KlapwijkBy Peter KlapwijkMay 31, 2022Updated:June 3, 2024133 Mins Read

    I recently needed to deploy certificates to the Trusted Publishers store on Windows devices with Microsoft Intune. And where the deployment of the certificates itself went fine (I could see the certificates show up in the store), the reporting in the Intune portal showed an error code -2016281112 for every certificate.

    I followed the steps from this Tech community article, but still, I saw the errors. I even opened a support case at Microsoft and one of the responses from the support engineer was, that this is a known error. It is on the backlog of the product group, but no idea when it will be fixed.

    I’m glad I’m sometimes a bit stubborn and didn’t want to close the support case immediately, because after some days I received a new update from an escalation engineer. He sent me a few screenshots and some additional information. He mentioned that the certificates could be easily deployed without reporting errors, by opening the certificate (.cer) file in Notepad, removing the break lines, and using that as the value in the custom Intune profile. OK, is it that simple, did I miss that 🙂
    Well, thanks Microsoft support for pointing me to that failure.

    So that’s it for this post, read the Tech community article, and don’t forget to remove the break lines 🙂
    No, let’s briefly walk through the steps I took to deploy the certificates to the Trusted Publisher store.

    Deploy the certificate with Intune

    The deployment of the certificates is done using a custom configuration profile with Microsoft Intune.
    To deploy the certificate we need to have the certificate in .cer format. We need to have the thumbprint of the certificate as we need to put that in the custom OMA-URI.

    There are several ways to retrieve the thumbprint, when you have the cer file, you can easily open the file and find the thumbprint on the details tab.

    Now open the cer file with Notepadd++.
    From the menu op Notepadd++, go to View, Show Symbol and check Show all Characters.

    And we now see we have a lot of break lines in the certificate file, which we need to remove.

    When we have removed the break lines, we need to copy everything between —–BEGIN CERTIFICATE—– and —–END CERTIFICATE—–.
    We are going to use this in a custom configuration profile as the value.

    Time to switch to the Microsoft Intune portal.

    • Sign in to the Microsoft Endpoint Manager admin center
    • Browse to Devices, Windows, Configuration profiles
    • Click +Create profile
    • Select Windows 10 and later as Platform
    • Select Templates as Profile type
    • Select Custom and click Create
    • Enter a Name
    • Click Next
    • Click Add to add a new OMA-URI row

    Fill in this information:

    Name: Trusted Publishers – certificate name (enter what fits your needs)
    OMA-URI: ./Device/Vendor/MSFT/RootCATrustedCertificates/TrustedPublisher/[thumbprint]/EncodedCertificate
    Data Type: String
    Value: the copied information from Notepad++

    Replace [thumbprint] with the thumbprint of the certificate.

    Click OK and add a row for every certificate you need to deploy.
    Deploy the configuration profile to the group of your needs.

    This is an example of a Microsoft certificate;
    URI:

    ./Device/Vendor/MSFT/RootCATrustedCertificates/TrustedPublisher/8be3a0cd11b786fdd08057e34d82fc5488eb7286/EncodedCertificate

    Value:

    MIIGCTCCA/GgAwIBAgITMwAAA4TZaH1mzHVLoQAAAAADhDANBgkqhkiG9w0BAQsFADB+MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSgwJgYDVQQDEx9NaWNyb3NvZnQgQ29kZSBTaWduaW5nIFBDQSAyMDExMB4XDTIzMDcxMzIzNDUzOFoXDTI0MDkxNTIzNDUzOFowgYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xMjAwBgNVBAMTKU1pY3Jvc29mdCAzcmQgUGFydHkgQXBwbGljYXRpb24gQ29tcG9uZW50MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAznLqoz/10Y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m3jHRubAw7KXMPMWNQ7OBTF6uzGKi2ELK/CsFyWfeUm6GdPVf+TDsKShhoZXtAXOZwBK3SQTY42gSwTBg4oPTldGd2SH2OIzhZXkxLCuSzk0LUmjVQ+K2xvkJzLMHi2oO6lTO8+SHjqhO1GPwnwhJLJfoaynNzAb3XMj3CdvPcd4EZDh9PRSI0SAHxaQQ0pD4+B1uSyqjUr9wGxZbisemYGzWIcB8UEsQ6mLE5QI7Z2zI2CNkU60iDI4BmEb38Gue8qcj3Zcs5teEOVDYILFsq9ToPkG0HluvkQhuhblf5xAGKzIHh5TEAXedGlYU3QXquQkdxs+quGlS+5xHQ0enmLi9FNXuBKC9jmAaJN8uKwS96+e5yxBGesTBgHuXhwT7YHLj8OUv2iQ66KXrvuAV0ouUf6hpLU5Gyn5STAJX1xy+muuKPPIfIvGWeBxxzONasTAedo/W4GggkBSRZSyT7w==

    The end-result

    The end-result is what we expect, the certificate is deployed to the Trusted Publisher store.

    Only devices which show a Success status.

    And no error code -2016281112 anymore.

    I hope this post will save you some time when you faced the same error as I had.
    And a note to the mentioned Tech Community article, it does very briefly mention the value shouldn’t have break lines (but PG why mention to your support organization it’s a known issue?)

    Intune MEM Microsoft Endpoint Manager Security Windows Windows 10 Windows 11
    Share. Facebook Twitter LinkedIn Email WhatsApp
    Peter Klapwijk
    • Website
    • X (Twitter)
    • LinkedIn

    Peter is a Security (Intune) MVP since 2020 and is working as Modern Workplace Engineer at Wortell in The Netherlands. He has more than 15 years of experience in IT, with a strong focus on Microsoft technologies like Microsoft Intune, Windows, and (low-code) automation.

    Related Posts

    Onboarding a passwordless Azure AD user

    April 1, 2023

    Assign Deny Local Log On user right to an (Azure) AD group by using Microsoft Intune

    June 1, 2022

    Add an Azure AD group to the local administrators group with Microsoft Intune

    April 18, 2020
    View 13 Comments

    13 Comments

    1. Alexej Fedorov on June 24, 2022 16:02

      Thank you soooooo much!!!!! I don’t know how long and far I searched for this

      Reply
    2. Semi Doludizgin on September 30, 2022 10:19

      Thank you for this guide.

      I have one question:

      The thumbprint shows spaces in the cert details (11 22 33) dialogue windows. If i check with powershell in the cert store the thumbprint doesnt use spaces (112233).

      I tried the thumbprint path without spaces but i am getting erros. Could this be a problem ?

      Reply
      • Peter Klapwijk on March 29, 2023 10:59

        Spaces should be avoided in the OMA-URI, this will cause issues.

        Reply
    3. Rory Rut on June 9, 2023 02:53

      Mine ended up under current user. I do not see where it can be specified. I followed the article and deployed to devices. What am I missing?

      Reply
    4. Jean-Francois Dupras on August 9, 2023 19:58

      Thanks! Cert is getting deploy fine However i still have error -2016281112

      Reply
      • KM on December 14, 2023 11:58

        I am getting the same error. did you figure this out?

        Reply
        • Marco van Egmond on May 17, 2024 14:39

          Today I needed to push a .cer to the trusted publishers and the push works but even with all the instructions and steps within onenote++ I also still get the -2016281112 error in the intune report blade.

          Reply
          • Peter Klapwijk on June 3, 2024 16:40

            Make sure that absolutely no break lines or spaces are in the text. Some people get spaces back when the break lines are removed. Otherwise give the example of the blog post a try.

            Reply
    5. Dinesh Singh on August 27, 2023 19:26

      Custom settings for NRPT rules

      I have 5 domain for them dns server configured, proxy not configured, automatically enabled , persistent not configured.

      How do I create a custom setting for it…….what will have Oma-URI, data type and value ?

      Reply
    6. Louis on February 1, 2024 13:05

      Is there a way to get the certificate to deploy into the Personal Certificates store rather than Trusted Publishers?

      Reply
    7. sanjeev kumar on June 13, 2024 16:55

      If any device escapes or fails to download the certificate, we want to mark it as non-compliant, and we want to enforce conditional access: if a certificate is missing, access will be blocked for users.

      how we can implement this in intune

      Reply
    8. Daniel on August 23, 2024 22:56

      Any chance you know how to deploy a certificate to ” trusted root certificate authorities”?

      Reply
      • Daniel on August 23, 2024 23:38

        Nevermind – was simply using ‘Root’ instead of TrustedPublisher. Cheers.

        Reply
    Leave A Reply Cancel Reply

    Peter Klapwijk

    Hi! Welcome to my blog post.
    I hope you enjoy reading my articles.

    Hit the About Me button to get in contact with me or leave a comment.

    Awards
    Sponsor
    Latest Posts

    Hide the “Turn on an ad privacy feature” pop-up in Chrome with Microsoft Intune

    April 19, 2025

    How to set Google as default search provider with Microsoft Intune

    April 18, 2025

    Using Windows Autopilot device preparation with Windows 365 Frontline shared cloud PCs

    April 13, 2025

    Using Visual Studio with Microsoft Endpoint Privilege Management, some notes

    April 8, 2025
    follow me
    • Twitter 4.8K
    • LinkedIn 6.1K
    • YouTube
    Tags
    Administrative Templates Android Automation Autopilot Azure Azure AD Browser Conditional Access Edge EMS Exchange Online Feitian FIDO2 Flow Google Chrome Graph Graph API Identity Management Intune Intune Monitoring iOS KIOSK Logic Apps macOS MEM MEMMonitoring Microsoft 365 Microsoft Edge Microsoft Endpoint Manager Modern Workplace Office 365 OneDrive for Business Outlook Passwordless PowerApps Power Automate Security SharePoint Online Teams Windows Windows 10 Windows10 Windows 11 Windows Autopilot Windows Update
    Copy right

    This information is provided “AS IS” with no warranties, confers no rights and is not supported by the authors, or In The Cloud 24-7.

     

    Copyright © 2025 by In The Cloud 24-7/ Peter Klapwijk. All rights reserved, No part of the information on this web site may be reproduced or posted in any form or by any means without the prior written permission of the publisher.

    Shorthand; Don’t pass off my work as yours, it’s not nice.

    Recent Comments
    • Peter Klapwijk on Using Windows Autopilot device preparation with Windows 365 Frontline shared cloud PCs
    • John M on Using Windows Autopilot device preparation with Windows 365 Frontline shared cloud PCs
    • Christoffer Jakobsen on Connect to Azure file shares with Microsoft Entra Private Access
    • Ludo on How to block Bluetooth file transfer with Microsoft Intune
    • RCharles on Automatically configure the time zone (during Autopilot enrollment)
    most popular

    Application installation issues; Download pending

    October 1, 2024

    Restrict which users can logon into a Windows 10 device with Microsoft Intune

    April 11, 2020

    How to change the Windows 11 language with Intune

    November 11, 2022

    Update Microsoft Edge during Windows Autopilot enrollments

    July 9, 2024
    Peter Klapwijk – In The Cloud 24-7
    X (Twitter) LinkedIn YouTube RSS
    © 2025 ThemeSphere. Designed by ThemeSphere.

    Type above and press Enter to search. Press Esc to cancel.

    Manage Cookie Consent
    To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
    Functional Always active
    The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
    Preferences
    The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
    Statistics
    The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
    Marketing
    The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
    Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
    View preferences
    {title} {title} {title}