Posted on 02-06-2024 07:05 AM
Hi,
I am trying to deploy a new plist from JAMF but this one contains <array> and it failed to deploy.
here the example :
Solved! Go to Solution.
02-07-2024 06:13 AM - edited 02-07-2024 08:51 AM
If you haven’t yet, it would be worth downloading their example mobileconfig file and examining that.
Something I think I see missing from your plist are the <dict> and </dict> tags that generally come at the beginning and end of the plist just inside the <plist> and </plist> tags. I think all plists are a dictionary first.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<array>
<dict>
<key>organization</key>
<string>company1</string>
<key>display_name</key>
<string>C1</string>
<key>onboarding</key>
<false/>
</dict>
<dict>
<key>organization</key>
<string>company2</string>
<key>display_name</key>
<string>C2</string>
<key>onboarding</key>
<false/>
</dict>
</array>
</dict>
</plist>
02-07-2024 08:55 AM - edited 02-07-2024 08:55 AM
I downloaded the mobileconfig file, and I believe you're also missing a key. Try this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>configs</key>
<array>
<dict>
<key>organization</key>
<string>company1</string>
<key>display_name</key>
<string>C1</string>
<key>onboarding</key>
<false/>
</dict>
<dict>
<key>organization</key>
<string>company2</string>
<key>display_name</key>
<string>C2</string>
<key>onboarding</key>
<false/>
</dict>
</array>
</dict>
</plist>
Posted on 02-06-2024 07:27 AM
Some additional information would be helpful.
What are you trying to accomplish with this plist? What are you expecting to see? And what are you actually seeing?
Posted on 02-06-2024 07:33 AM
This plist file is used to set up an application.
Following documentation from the app - I should be able to add 2 organization (see plist).
If I deploy only 1 organization (so no need of array) - this works well.
Posted on 02-06-2024 07:43 AM
There's nothing wrong with the plist as far as I can tell. You can check plist files for issues using a few different tools, including xmllint, which ships with the macOS.
My question is, you mention you're trying to deploy it, but how exactly? Is the plist file created locally and then packaged up? Is it being scripted out? If it's being scripted, how exactly are you attempting to create this plist in your script.
You haven't given us enough information to really be able to help you.
Posted on 02-06-2024 10:07 AM
Can you link to the vendor's documentation for us to review too? And does the documentation explicitly state you can create an array like this? Their software has to support it.
Posted on 02-07-2024 12:00 AM
02-07-2024 06:13 AM - edited 02-07-2024 08:51 AM
If you haven’t yet, it would be worth downloading their example mobileconfig file and examining that.
Something I think I see missing from your plist are the <dict> and </dict> tags that generally come at the beginning and end of the plist just inside the <plist> and </plist> tags. I think all plists are a dictionary first.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<array>
<dict>
<key>organization</key>
<string>company1</string>
<key>display_name</key>
<string>C1</string>
<key>onboarding</key>
<false/>
</dict>
<dict>
<key>organization</key>
<string>company2</string>
<key>display_name</key>
<string>C2</string>
<key>onboarding</key>
<false/>
</dict>
</array>
</dict>
</plist>
02-07-2024 08:55 AM - edited 02-07-2024 08:55 AM
I downloaded the mobileconfig file, and I believe you're also missing a key. Try this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>configs</key>
<array>
<dict>
<key>organization</key>
<string>company1</string>
<key>display_name</key>
<string>C1</string>
<key>onboarding</key>
<false/>
</dict>
<dict>
<key>organization</key>
<string>company2</string>
<key>display_name</key>
<string>C2</string>
<key>onboarding</key>
<false/>
</dict>
</array>
</dict>
</plist>
Posted on 02-06-2024 07:48 AM
Hi,
This plist is deployed from Configuration profile , under Application & Custom settings.
I deployed 1 already but with only 1 organization and without <array> inside and it works very well. I can see it under profile on my mac.
If I add 2 organization - so adding <array> - in Logs I can see "Failed".
Thanks
Posted on 02-06-2024 10:39 AM
Ok, understood now. As I mentioned, the plist format seems fine to me, so if it's failing to deploy to your Macs, the only thing that comes to mind is that it's probably an issue on the software side. Although, not sure that that really makes sense to me either. Jamf should be able to deploy the plist to a Mac as long as the plist is not malformed. I don't think it would care what software it's meant for. But I don't know.
Posted on 02-07-2024 12:02 AM
the software can be installed without profile - this profile will only give some info like our organization name and other settings.
I agreed with you about Jamf should be able to deploy it as the plist seems fine.