10-26-2017 08:56 AM - edited 09-01-2021 01:27 PM
Overview
Deploying bookmarks as an admin is deeply off putting. Every web browser does it differently, files change often and if you do it wrong, your users lose 100's of saved websites that they have accumulated over the years. Using a configuration profile to toggle a setting enforces that setting on a device when the profile installed. By pushing bookmarks into Google Chrome in this fashion, they end up in a managed bookmarks folder that:
- the user is not able to change.
- has no effect on the user's existing bookmarks.
I have not found a great step-by-step guide to perform this task online so here's my attempt at this. Feedback is not only welcome but encouraged.
You will need the following:
1. A macOS device
2. Basic knowledge of the Terminal application (or Xterm or similar)
3. The ability to create, read & update a computer configuration profile in the JSS.
Part 1: Use Terminal to create a basic .plist file
1. Open Applications > Utilities > Terminal.app
2. Run the following command to create a blank .plist file on your Desktop with a blank Managed Bookmarks array.
defaults write ~/Desktop/com.google.chrome.plist ManagedBookmarks -array-add
3. Convert the .plist file to xml using the following command in terminal (yup I know, it looks like xml already, but it's not)
plutil -convert xml1 ~/Desktop/com.google.chrome.plist
4. Open the file in your favorite text editor and start adding bookmarks in the following way. Notice that a bookmark is broken into 4 parts, two keys: Name and URL and two strings: the name and the URL.
<key>ManagedBookmarks</key> <array> <dict> <key>name</key> <string>Google HomePage</string> <key>url</key> <string>http://www.google.com</string> </dict> </array>
Optional (but recommended): Check the file for syntax errors. Save the file and return to Terminal. Use the following command to check your plist for formatting errors:
plutil -lint ~/Desktop/com.google.chrome.plist
Part 2: Import the .plist into a custom Computer Configuration Profile Payload
1. Log into your Jamf Pro Server
2. Navigate to Computers > Configuration Profiles and Click "New"
3. Give your profile a Name and a Distribution Method on the General Payload Pane
4. Scroll down to the Custom Settings Payload Pane and click "Configure"
5. Enter the Preference domain: com.google.Chrome (NOTE: Do not add the .plist extension.)
6. Click the Upload Property List File button
7. In the pop-up, click "Choose File" and Select the com.google.chrome.plist file on your desktop and click "Upload"
8. Verify your plist uploaded successfully by looking at the JSON code that is added below the "Update Property List File" button. It should look like this:
9. Save the Configuration Profile (I know it's not scoped yet, trust me.)
Part 3: Testing and Validation
1. Download the profile by clicking the download button at the bottom of the page.
2. Install the profile on your computer.
3. Open Chrome and checkout the bookmarks menu. You should see a folder called Managed Bookmarks with the Google Home Page in it like this:
4. Quit Chrome
5. Open System Preferences and navigate to the Profiles Pane
6. Remove the profile you downloaded
7. Fix any errors and try it again - or - add a scope to the Profile on the JSS and push the Profile down from the Jamf Pro Server
Suggested Next Steps:
Read up on Bookmarks definition for Chromium and add folders to your managed bookmarks folder as necessary.
Sources:
• Managed Bookmarks Definition from Chrome Enterprise
Thanks to the following contributors:
• @MDhaliwal - Optional step in Part 1 to check the plist for syntax errors.
Posted on 03-15-2018 05:21 AM
Thanks to @MDhaliwal for the calling out the optional step in part 1.
Posted on 06-26-2018 10:04 AM
This worked! It took a little doing but it works!! THANK YOU
Posted on 10-15-2018 11:53 AM
What's the command to always show the bookmarks bar?
Posted on 01-10-2019 11:34 AM
To enable the Bookmarks bar, use:
<key>BookmarkBarEnabled</key> <true/>
Posted on 04-26-2019 11:23 AM
How would it look if i was to have multiple bookmarks all under "Managed Bookmarks". How would the steps changed.
Posted on 05-08-2019 08:00 AM
I was messing around with adding multiples bookmarks today and realized you just need to work within the array and add a new <dict> for each bookmark. So something like this would work. Just continue that path and keep adding as many as you want.
Posted on 07-08-2019 10:00 AM
How would multiple embedded folders work? We have quite a few that we push via group policy on PC right now.
Posted on 07-09-2019 04:34 PM
I believe it should look like below, based on this
http://www.chromium.org/administrators/policy-list-3#ManagedBookmarks
Sorry if this double posts, I realized I messed up and forgot to return a line. Of course also remove the #comments inline for info.
Posted on 11-08-2019 02:08 PM
So, we use this to show the bar:
<key>BookmarkBarEnabled</key>
<true/>
However, if we don't use this, the option to show the bookmark bar is grayed out under the 3 dots, bookmarks. What we want to do is have users be able to display or not display the bar if they want. Anyone have any ideas?
Posted on 11-19-2019 12:54 PM
@mgorton Since this is a plist being pushed through a configuration profile, you are enforcing these settings. If you want to set defaults, but still allow users to change them, you don't want to use a configuration profile. You might be able to push the plist through a policy that runs once for each device (or user, depending on your environment).
That should let you set defaults without making those settings enforced.
Posted on 08-12-2020 06:42 AM
Here is a quick custom schema you can upload into the Application and Custom Settings payload of a config profile as well. This should enable an admin to add multiple bookmarks fairly quickly. Enjoy!
{
"$schema": "http://json-schema.org/schema#",
"title": "JSON-Schema Example Profile",
"description": "This profile is an example of how to use the JSON Schema wihin the Jamf Pro Custom Application Settings in a managed distribution configuration workflow.",
"properties": {
"ManagedBookmarks": {
"type": "array",
"title": "Bookmarks",
"description": "Add a bookmark name and URL",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Bookmark Name"
},
"url": {
"type": "string",
"title": "Bookmark URL"
}
}
}
}
}
}
Posted on 04-23-2021 04:14 PM
Is there a way to change the Bookmark folder name from "Managed Bookmarks" to something else?
Posted on 09-01-2021 01:33 PM
Yes, Google added a key (which must be in its own dictionary inside the array) called "toplevel_name" with a string value of whatever you want to the call the folder. Here's a snippet of an example for a folder called "IT Bookmarks" ...
<dict>
<key>toplevel_name</key>
<string>IT Boookmarks</string>
</dict>
02-17-2022 09:11 AM - edited 02-17-2022 09:11 AM
Hey @NickKoval
I can't get this to work. Chrome still says "managed bookmarks"
Can you elaborate on this?
Posted on 04-24-2021 12:45 PM
Great that we can do this with a plist and config profile, but it may be worth looking at Google Chrome Browser Management - https://support.google.com/chrome/a/answer/9116814?hl=en
Posted on 06-16-2021 09:55 AM
The latest version of Chrome 91.0.4472.106 breaks this process. I had it deployed on the version previous to latest and was working.
Posted on 09-01-2021 01:28 PM
hmmm ... I just deployed these settings to Google Chrome v. 93.0.4577.63 and it worked like a charm. Are you still seeing it fail @jtaveras?
Posted on 09-01-2021 04:26 PM
@NickKoval same issue, do you have to re-deploy them? like remove the conf profile and re-push it? anything different?
Posted on 03-22-2024 01:06 PM
Flippin beautiful! Still works in 2024. Now if I could find the how-to for Safari and Brave.
Posted on 03-25-2024 05:51 AM
FYI, for Brave the process is exactly the same, except for step 5 in part 2. Instead of using "com.google.Chrome" as your preference domain, use: com.brave.Browser. Same plist file will work.
Posted on 03-27-2024 10:03 AM
This has been extremely helpful. I was able to deploy Managed bookmarks and even rename the Managed Bookmarks folder to something custom using the top-level name piece. I tried following the other instructions to get additional folders setup under the top-level folder but couldn't get anything to work. Does anyone have any tips on the "children" key? or have a sample plist for chrome that has multiple subfolders?
a week ago
I've followed the directions but the managed bookmark bar isnt showing up.
Ive checked my code with the command posted above and shows " OK"
Can anyone assist?