Forum Discussion
PatrickF11
Oct 11, 2019Steel Contributor
HowTo OMA-URI - something not working
Hi folks, i'm trying to experiment with OMA-URI within custom profiles. In this Use-case we're trying to achive, that we can manage Google Chrome Updates. Therefore i've downloaded the GoogleUp...
- Oct 16, 2019
1. Ingesting custom ADMX Files and use them to configure some settings is supported and should work. (as in my case: the chrome update for example.)
=> Starting in Windows 10, version 1703, you can import ADMX files (also called ADMX ingestion) and set those ADMX-backed policies for Win32 and Desktop Bridge apps by using Windows 10 Mobile Device Management (MDM) on desktop SKUs. The ADMX files that define policy information can be ingested to your device by using the Policy CSP URI,
./Device/Vendor/MSFT/Policy/ConfigOperations/ADMXInstall
. The ingested ADMX file is then processed into MDM policies.
https://docs.microsoft.com/en-us/windows/client-management/mdm/win32-and-centennial-app-policy-configuration2. Naming:
Ingesting of an ADMX File:
- How could i have known that i need to name this "chrome" instead of "ChromeUpdate"?
(If i would have known that, i would have used this of course in the setting OMA-URI itself, too)
- You've left away "./Device" in your suggestion. Isn't it neccesary for me?
=> simply look at the ingested ADMX file and you will see the complete structure and here we have the Chrome~
Sorry slightly different screenshot (chrome policy not googleupdate) but was the one I had currently, same applies to googleupdate of course...
regarding ./Device:
Device scope:
- ./Device/Vendor/MSFT/Policy/Config/AreaName/PolicyName to configure the policy.
- ./Device/Vendor/MSFT/Policy/Result/AreaName/PolicyName to get the result.
For device wide configuration the Device/ portion may be omitted from the path, deeming the following paths respectively equivalent:
- ./Vendor/MSFT/Policy/Config/AreaName/PolicyName to configure the policy.
- ./Vendor/MSFT/Policy/Result/AreaName/PolicyName to get the result.
https://docs.microsoft.com/en-us/windows/client-management/mdm/policy-configuration-service-provider
3. The Ingesting of the ADMX with the choosen name "ChromeUpdate" instead of "Chrome" worked. At least i can see this in the registry. (.\PolicyManager\AdmxInstalled\ChromeUpdates)
Why is this wrong anyway? (I thought that this could be a freely choosen name which should be equal to the name i use in the setting.)
=> Only during the ingestion the name at the end is free to choose, it must not be equal, you could also name it ChromeV2Admx for example. Here I've chosen ChromeAdmx
./Vendor/MSFT/Policy/ConfigOperations/ADMXInstall/Chrome/Policy/ChromeAdmxIt's an ingestion name and does not correlate to the category path from above.
Sorry slightly different screenshot (chrome policy not googleupdate) but was the one I had currently, same applies to googleupdate of course...
4. How could i found out the proper data type and the value, e.g. when it is a string and not a simple number (integer). In some cases i need something like "</enable>" followed by completely various strings.
=> looking at this article:
Understanding ADMX-backed policies
https://docs.microsoft.com/en-us/windows/client-management/mdm/understanding-admx-backed-policies
there are examples of Decimal Element, Boolean Element, List Elements, Enum, No Element, MultiText Element, Text Element
Thank you very much for answering my questions and pushing me in the right directions.
Hopefully my questions are not that dumb. 😄 (I'm really interested in understanding this topic, not just making it work through copy&paste)
Oct 17, 2019
Hey PatrickF11,
I've seen this error just once. I couldn't fix it at that point in time. I've recreated the policy and the error went away. I don't know what caused this and I've never seen the error again. Please try to recreate the complete policy.
best,
Oliver
PatrickF11
Oct 17, 2019Steel Contributor
it has already been sufficient to remove this OMA-URI Setting out of the profile and to re-add it.
Could you please answer my last question belonging the data id?
Thank you very much! You really teached me many things about the OMA-URI Settings. 🙂
- PatrickF11Oct 18, 2019Steel Contributor
Probably your article would have helped, too.
Just a short addition to your article:
You're building the string together while looking inside of the admx file.
Of course, this is working. But it's much easier, after ingesting the admx file, to have a look at the clients registry. (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\AdmxDefault\)
At this location, every policy ingested by an admx is listed.
- PKlapwijkOct 18, 2019MVP
Hi PatrickF11 With the help of Oliver you have probably already deployed the policy, otherwise have a look at my article about managing Chrome with intune https://www.inthecloud247.com/manage-google-chrome-settings-with-microsoft-intune/ Maybe it is of any help.
- PatrickF11Oct 18, 2019Steel Contributor
- Oct 17, 2019
that's correct,
NAME222
is absolutely free and has no consequence other than representation in registry. Often it is wise to use something like your own prefix or a version MyFile or Filev1
NAME111
has to be used in both OMA-URIs that's why it miss understandingly referred to not free to choose. in fact it is free to choose but must be used in both OMA URIs
your summary is correct! 👍
- PatrickF11Oct 17, 2019Steel Contributor
there's one last question left open, after i've read through the links recommended by you:
When ingesting an admx, first i have to build the OMA-URI Path.
./Device/Vendor/MSFT/Policy/ConfigOperations/ADMXInstall/NAME111/Policy/NAME222
In one of your earlier replies you've written, that only "NAME222" is a free to choose name.
After i've read though the articles i think that "NAME111" is also free to choose, when ingesting the admx file.
What i know: When configuring an element i need to use "NAME111" of course like in the following example:
./Device/Vendor/MSFT/Policy/Config/NAME111~Policy~RestOfConfigPath/ConfigItem
And of course: i need to look into the registry (PolicyManager\AdmxDefault\...) to find the correct name for the config. ("RestOfConfigPath")
So referrencing to the Subject "Chrome Update":
I could have build the OMA-URI String for ingesting like i mentioned above, with the freely choosen name (NAME111).
Afterwards i could add configurations like that:
./Device/Vendor/MSFT/Policy/Config/NAME111~Policy~RestOfConfigPathFromRegedit/ConfigItem
Did I summarize that correctly?
So the name "NAME111" doesn't matter at all, it just have to be the same in the "ingesting part" and in the "configuration part" of my custom intune profile, right?
- PatrickF11Oct 17, 2019Steel Contributor
Ladys and Gentlemen: THIS is good support! 🙂
Again: Thank you for all the help.
I really don't know which of your answers i should mark as "best response" 😄
And thanks to all the others. 🙂 I really appreciated it.
- Oct 17, 2019
Sure here we go 🙂
Part_ is correct as we reference the policy decimal element id with that:
<policy name="Pol_AutoUpdateCheckPeriod" class="Machine" displayName="$(string.Pol_AutoUpdateCheckPeriod)" explainText="$(string.Explain_AutoUpdateCheckPeriod)" presentation="$(presentation.Pol_AutoUpdateCheckPeriod)" key="Software\Policies\Google\Update"> <parentCategory ref="Cat_Preferences" /> <supportedOn ref="Sup_GoogleUpdate1_2_145_5" /> <elements> <decimal id="Part_AutoUpdateCheckPeriod" key="Software\Policies\Google\Update" valueName="AutoUpdateCheckPeriodMinutes" required="true" minValue="0" maxValue="43200" /> </elements> </policy>
with this value and notation we are referencing the value directly not the policy element
<enabled/> <data id="Part_AutoUpdateCheckPeriod" value="60"/>
This way the MDM client exactly knows which element in the ADMX file it has to use. Tt can also be the case that an policy definition has more than one element for configuration. That's why we exactly reference the value which configures the setting in the end.