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

Failed to save file due to path length limitations #184

Open
jjrmilner opened this issue Jan 8, 2024 · 8 comments
Open

Failed to save file due to path length limitations #184

jjrmilner opened this issue Jan 8, 2024 · 8 comments

Comments

@jjrmilner
Copy link

I have picked up several configuration profiles which are not exporting.

It looks like the combination of the tenant name and the fact that the profiles have long names (almost near the Intune GUI limit.).

Here is an example:

Export Settings Catalog: CIS-EDGE-D-I: 1.50 (L1) Ensure 'Automatically import another browser's data and settings at first run' is set to 'Enabled: Disables automatic import, and the import section ... (90/579)
Failed to save file C:\Intune\Global Micro Solutions\SettingsCatalog\CIS-EDGE-D-I 1.50 (L1) Ensure 'Automatically import another browser's data and settings at first run' is set to 'Enabled Disables automatic import, and the import section _24b3d7d8-9533-469d-8b5f-77e5881c4a52.json Exception: Could not find a part of the path 'C:\Intune\Global Micro Solutions\SettingsCatalog\CIS-EDGE-D-I 1.50 (L1) Ensure 'Automatically import another browser's data and settings at first run' is set to 'Enabled Disables automatic import, and the import section _24b3d7d8-9533-469d-8b5f-77e5881c4a52.json'.
File not found: C:\Intune\Global Micro Solutions\SettingsCatalog\CIS-EDGE-D-I 1.50 (L1) Ensure 'Automatically import another browser's data and settings at first run' is set to 'Enabled Disables automatic import, and the import section ..._24b3d7d8-9533-469d-8b5f-77e5881c4a52.json. Could not add assignments to file.

@jjrmilner
Copy link
Author

As a test, I unchecked the options to "include object type", and "include tenant name". This effectively shortens the save path.

After making the change, there are no save errors in the logs.

@jjrmilner
Copy link
Author

jjrmilner commented Jan 8, 2024

I still get "File not found errors" eg

File not found: C:\Intune\SettingsCatalog\CIS-OFFICE-U-I 2.5.14.3.11 (L1) Ensure 'Configure Outlook object model prompt When accessing the Formula property of a UserProperty object' is set to 'Enabled ..._2d8e328f-e17f-4952-88d2-af9f93c27816.json. Could not add assignments to file.

The files does save,
CIS-WINBL-D-I 18.9.7.1.6 (BL) Ensure 'Prevent installation of devices using drivers that match these device setup classes.zip

@jjrmilner
Copy link
Author

After some additional testing, this issue seems to be an assignments export problem - not a save problem. If I disable exporting assignments, there is no error. Please let me know if we should open a second issue ?

@Micke-K
Copy link
Owner

Micke-K commented Jan 9, 2024

Hello,

I did some testing and it is a mix of the 260 path limit and a bug caused by policy name ends with dots.. Since the file is over 260 characters, it fails to create the json. When it then tries to add the assignments to it since the file does not exist.

That must be the longest Intune policy name I've ever seen! I might look at this in the future but for now I leave that part as a know limit. There are lot of functions that uses the same way so it be a fair bit of redesign to fix it.

For the other part, try the updated modules in the attached. I didn't do much testing so I hope it doesn't break anything else.

Cheers!

MSGraph.zip

@jjrmilner
Copy link
Author

jjrmilner commented Jan 9, 2024 via email

@jjrmilner
Copy link
Author

jjrmilner commented Jan 9, 2024 via email

@Micke-K
Copy link
Owner

Micke-K commented Jan 10, 2024

Hello!

I don't think that would be possible but send me an IM on X.

Cheers!

@jjrmilner
Copy link
Author

jjrmilner commented Jan 10, 2024 via email

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