4

I'm developing an extension and I'm trying to use the enterprise.deviceAttributes API, but "This API is only for extensions pre-installed by policy.". How can I simulate a pre-installed by policy extension in sandbox so I can develop it?

Also, I noticed that this API is not "dev channel only" anymore, so now I can use it in production?

Question about Google Admin:

I will require the users to install my extension to their "children"* via Google Admin > Chrome Management > User Settings, so the user won't need to enroll devices, and the extension will be "installed by policy". In this case, which devices aren't enrolled, can I still get the deviceID of the "children" with my extension and then call the Admin API to get device info?

*Children is an example, could be students, employees....

DMkitten
  • 139
  • 1
  • 9

1 Answers1

2

I found a workflow that doesn't require me to wait on approval from the Chrome Web Store, but it's a little clunky.

  1. This was tried on a Chromebook in developer mode. I don't know if that matters.
  2. Upload your extension as a draft to the Chrome Web Store
  3. Note the ID assigned to your draft in the Chrome Web Store developer dashboard
  4. In Google Admin, under Devices > Chrome > Apps & Extensions select "Add Chrome app or extension by ID"
  5. Put in the extension ID from the developer dashboard
  6. Change "From the Chrome Web Store" to "From a custom URL" and put in a junk URL
  7. Make sure the extension is set to "Available" and not "Forced" (if it is set to forced you won't be able to manually install the extension)
  8. Download the CRX file from the "package" section of your saved draft from the chrome web store and copy it to your Chromebook. Your CRX file will now be signed by the blessed Google keys
  9. Drag it in to the chrome://extensions page on the Chromebook to install it
  10. Disable the extension but do not uninstall it
  11. Change the extension to "forced" in Google Admin
  12. Go to chrome://policy and reload policies.
  13. If you refresh chrome://extensions you should see that the extension is now force-enabled and should be running with enterprise.deviceAttributes permissions (assuming your extension requested them)
9072997
  • 849
  • 7
  • 21