Deploying Managed Bookmarks to Google Chrome using a plist and configuration profiles with custom payloads

NickKoval
Contributor
Contributor

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:
a641b69d5e08449f852d557d830c8127
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:
d60c5778bc4a423394448e4fd0b4c04b
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.

21 REPLIES 21

NickKoval
Contributor
Contributor

Thanks to @MDhaliwal for the calling out the optional step in part 1.

dhinchman
New Contributor

This worked! It took a little doing but it works!! THANK YOU

mjerome
New Contributor II

What's the command to always show the bookmarks bar?

johnpowell
New Contributor II

To enable the Bookmarks bar, use:

<key>BookmarkBarEnabled</key> <true/>

zake
New Contributor III

How would it look if i was to have multiple bookmarks all under "Managed Bookmarks". How would the steps changed.

ZakAquistapace
New Contributor

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.16a43638f74c484c808753709dc04146

mgorton
New Contributor III

How would multiple embedded folders work? We have quite a few that we push via group policy on PC right now.

jaredgrieve
New Contributor II

I believe it should look like below, based on this

http://www.chromium.org/administrators/policy-list-3#ManagedBookmarks

3510664659b34378b56e1a5b3ec3e12a

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.

mgorton
New Contributor III

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?

johnpowell
New Contributor II

@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.

sam_clark
New Contributor III

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"
                    }
                }
            }
        }
    }
}

GitHub file here.

kcsantos
New Contributor III

Is there a way to change the Bookmark folder name from "Managed Bookmarks" to something else?

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>

 

ooshnoo
Valued Contributor

Hey @NickKoval 

I can't get this to work.  Chrome still says "managed bookmarks" 

Can you elaborate on this?

kissland
New Contributor III

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

jtaveras
New Contributor III

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.

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

jtaveras
New Contributor III

@NickKoval same issue, do you have to re-deploy them? like remove the conf profile and re-push it? anything different?

unkinected
New Contributor

Flippin beautiful! Still works in 2024. Now if I could find the how-to for Safari and Brave.

unkinected
New Contributor

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.

ckelly176
New Contributor

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?