Chrome not recognizing custom policies set for an extension

99 views
Skip to first unread message

Fahad Jameel

unread,
May 29, 2024, 11:16:46 AM5/29/24
to Chromium Extensions
I am trying to add a custom policy that I can read from my chrome extension. But for some reason chrome isn't even recognizing the policy as being set. When I go to chrome://policy/ nothing is being displayed.

I am following this article:  Configuring Apps and Extensions by Policy (chromium.org)

enter image description here

Oliver Dunk

unread,
May 29, 2024, 11:35:07 AM5/29/24
to Fahad Jameel, Chromium Extensions
Hi Fahad,

Have you set up the schema in your manifest.json file? There's an example here: https://developer.chrome.com/docs/extensions/reference/manifest/storage

Thanks,
Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB


--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/27ebfe22-aca3-4c79-9213-1fc2f15d50e4n%40chromium.org.

Fahad Jameel

unread,
May 29, 2024, 1:10:22 PM5/29/24
to Chromium Extensions, Oliver Dunk, Chromium Extensions, Fahad Jameel
I totally missed that. Got it working now with the schema.json file. 

schema.json
{
    "type": "object",
    "properties": {
        "tenant": {
            "title": "Tenant",
            "description": "Tenant Name",
            "type": "string"
        }
    }
}

manifest.json
storage: {
    managed_schema: "schema.json"
  },

Thanks!

Oliver Dunk

unread,
May 29, 2024, 1:12:44 PM5/29/24
to Fahad Jameel, Chromium Extensions
Appreciate the follow up!

Our documentation there is definitely lacking - I'll see if we can get that updated.

Thanks,
Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB
Reply all
Reply to author
Forward
0 new messages