Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to Upload some ADMX Files, but others succeed #169

Open
mike16329 opened this issue Oct 6, 2023 · 19 comments
Open

Failing to Upload some ADMX Files, but others succeed #169

mike16329 opened this issue Oct 6, 2023 · 19 comments

Comments

@mike16329
Copy link

mike16329 commented Oct 6, 2023

@Micke-K I manually imported 10 ADMX and their associated ADML files into Intune and then configured an Administrative template. However, when I try to use Intune Manager to import the ADMX files that I exported only some succeed. The ones that fail all fail with the same error: Failed to invoke MS Graph with URL https://graph.microsoft.us/beta/deviceManagement/groupPolicyUploadedDefinitionFiles (Request ID: bdb29314-341c-406e-9f12-20e4e7c0dceb). Status code: BadRequest. Response message: . Response message: Content Parsing exception: Data at the root level is invalid. Line 1, position 1. - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: 475d06bd-18db-4cb8-95ab-e32b7fb423ea - Url: https://fef.fxpasu01.manage.microsoft.us/GroupPolicy/GroupPolicyAdminService/b15c97ad-ffff-6465-0807-100508342556/deviceManagement/groupPolicyUploadedDefinitionFiles?api-version=5018-11-06 - CustomApiErrorPhrase: ContentParsingException Exception: The remote server returned an error: (400) Bad Request.

Any thoughts?

@Micke-K
Copy link
Owner

Micke-K commented Oct 7, 2023

Hello!

Same issue as 124?

Looks like Microsoft is changing a few things in the background so it has stopped working a couple of times.

Can you try the updated file?

EndpointManager.zip

Cheers!

@mike16329
Copy link
Author

mike16329 commented Oct 10, 2023 via email

@Micke-K
Copy link
Owner

Micke-K commented Oct 10, 2023

Hello,

The photo error is just the script trying to download your photo for the login info. That is expected if you don't have one.

Can you attach the full log?

So you have 10 json in the folder with admx/adml files and only 5 uploaded. Can you zip the json and admx/adml file and attach as well?

So you are having issues with the actual admx/adml upload and not policy upload?

Cheers!

@mike16329
Copy link
Author

mike16329 commented Oct 11, 2023 via email

@Micke-K
Copy link
Owner

Micke-K commented Oct 14, 2023

Hello,

I've started looking at this. I can replicate the issue whit the import of admx/adml.

The Windows Administrative Templates.json fails to import because it does not have the required information in it. Microsoft changed something a while back which broke the functionality. The ID of each setting is unique for each environment so it does not support migration between environments by default. The script will add additional information in the json files so that it can find the settings in the destination environment. This information is not available in the json. You will need to re-export the policy with the latest code (attached earlier). You should have "#Presentation_ID" properties in the json for this to work.

I'll try to get some time to look at the import of admx/adml soon.

Cheers!

@Micke-K
Copy link
Owner

Micke-K commented Oct 15, 2023

Hello,

I found the issue. These admx/adml files are stored as UTF8. That caused the script to fail during the import.

I've fixed it and it will be included in the next release. I'm doing the last testing for it now.

Cheers!

@mike16329
Copy link
Author

mike16329 commented Oct 16, 2023 via email

@mike16329
Copy link
Author

mike16329 commented Oct 16, 2023 via email

@Micke-K
Copy link
Owner

Micke-K commented Oct 17, 2023

Hello,

I just released 3.9.2. I did an export and I got the additional information in the json files so this should work now.

Let me know how it goes.

Cheers!

@mike16329
Copy link
Author

mike16329 commented Oct 17, 2023

Hi,

This does still not appear to be working for me unfortunately. I brought down the whole new 3.9.2 package and ran that to open Intune manager (see attached about info screenshot), then exported windows the windowsadministrativetemplates.json file and attempted to import it into another tenant that already had the 10 ADMX files imported, it still only imported a partial amount of the configurations that are configured within windowsadministrativetemplates.json. It provided many instances of the same error in the log: "Failed to invoke MS Graph with URL https://graph.microsoft.us/beta/deviceManagement/groupPolicyConfigurations/80e24519-3e6a-4d11-bbce-3a39a5464bbc/definitionValues (Request ID: 4de2f687-7ff9-4eb1-bfba-78e390e573c7). Status code: NotFound. Response message: . Response message: An error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: 332691f6-54f1-45eb-b286-fd6e9f33abd4 - Url: https://fef.fxpasu01.manage.microsoft.us/GroupPolicy/GroupPolicyAdminService/b15c97ad-ffff-4233-1005-101700303213/deviceManagement/groupPolicyConfigurations('80e24519-3e6a-4d11-bbce-3a39a5464bbc')/definitionValues?api-version=5018-11-06 Exception: The remote server returned an error: (404) Not Found."

Additionally, the windowsadministrativetemplates.json does not appear to have any mention of "presentation_id" like you mentioned in an earlier post. I've attached the about info and the windowsadministrativetemplates.json that I exported using 3.9.2.

Good news is the ADMX import via Intune Manager is working with all 10 ADMX files now.

about -intunemanager

Windows Administrative Templates.json

@Micke-K
Copy link
Owner

Micke-K commented Oct 18, 2023

Hello,

Thank you for the json! I finally understand what the issue is. You have a mixed policy eg based on built-in settings and imported admx settings. I had no idea that was even an option. I manged to create one of these and export/import it in the same tenant. I did get the extra properties in the json.
Note: I did NOT try export/import between environments.

Can you try this and let me know how it goes?

Cheers!

EndpointManager.zip

@mike16329
Copy link
Author

mike16329 commented Oct 18, 2023 via email

@mike16329
Copy link
Author

@Micke-K I spoke too soon. It only works in some tenants and not others. The 10 ADMX files import just fine, but then the administrative templates device configuration profile imports into some tenants with all custom and built in settings, but in others only the built in settings import and the Intune manager log shows various errors that state "Could not find presentation for setting . Setting will not be configured." I even made sure to wait until I see the 10 ADMX files show successfully imported before even attempting the administrative template configuration import.

@Micke-K
Copy link
Owner

Micke-K commented Nov 3, 2023

Hello!

Thank you for testing and coming back with results.

So it fully work in some environments and fail in others. That is a bit strange. Can you attach a log from one of them. I might have to add some additional logging to see what is happening. I'll see if I can fix that on the weekend.

Cheers!

@mike16329
Copy link
Author

mike16329 commented Nov 4, 2023 via email

@mike16329
Copy link
Author

Unsuccessful import of administrative templates json with built in and custom settings (only built in settings import successfully)
Successful import of administrative templates json with built in and custom settings

@Micke-K I have attached two screenshots of Intune Manager logs. One showing logs during a successful upload if the administrativetemplates.json with both built in and custom settings successfully importing. The other screenshot shows logs from an unsuccessful import (the built-in settings import but the custom do not). These are both GCC High tenants. Please let me know what else I can do to assist the troubleshooting. Thanks!

@Micke-K
Copy link
Owner

Micke-K commented Nov 7, 2023

Hello, @mike16329,

Do you swap tenants between imports? Does it work to import if you restart the app?

I cache the list of custom admx policies but I didn't clear the cache after swapping tenants or imported admx files. This will cause it to fail if importing to multiple tenants without restarting the app.

I'll fix this in the next version.

Cheers!

@mike16329
Copy link
Author

Hi @Micke-K it appears to be exactly that. I was not restarting the Intune Manager app between imports. I just restarted it and imported 100% successfully into a completely new test tenant. Good to know, thanks!

@Micke-K
Copy link
Owner

Micke-K commented Jan 2, 2024

This should be fixed in the latest version. Let me know if you still have any issues.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants