New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 784946 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

Feature request: Chrome App API to determine if an app is running on a managed Chromebook

Reported by sarah.e...@testsys.com, Nov 14 2017

Issue description

Chrome Version       : 63.0.3239.26
OS Version: 10032.21.0


What steps will reproduce the problem?
There is no Chrome API available for apps to determine if they are running on a managed or un-managed Chromebook. 

What is the expected result?
A Chrome App API that returns whether or not the device is managed.

What happens instead of that?
Currently there is no way to determine programmatically if our app is running on a managed Chromebook. 

UserAgentString: Mozilla/5.0 (X11; CrOS x86_64 10032.21.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.26 Safari/537.36



 
Components: Platform>Extensions Enterprise
Labels: Enterprise-Triaged
Owner: dskaram@chromium.org
Cc: pelets...@chromium.org
Sarah, can you please specify more precisely your use case?
Sure, here is some background. Our apps are kiosk enabled and we require that the app run in kiosk mode in order to access certain functionality. 

Since kiosk mode is transitioning to only be available on managed devices (see https://support.google.com/chromebook/answer/3134673) we would like the app to be able to determine programatically whether it is running on a managed or unmanaged device and display appropriate messaging.

Also, if we can identify which of our clients are using unmanaged devices we can proactively reach out and let them know about Google's policies. 

This should be a Chrome API that is available on both managed and unmanaged devices. Thanks!

Comment 5 by cyrusm@chromium.org, Nov 24 2017

Cc: maxkirsch@chromium.org
David or Max - can you help here?  I'm almost positive there's a way for a Chrome app/extension to tell if they're running in a managed session.  Any tips here for how it can be done?  I don't think this is something new we need to build.

Thanks.
I don't think we expose that currently.

But I also don't 100% understand the use case - existing non-managed kiosk deployments will continue to work (I don't think we're forcing people to stop using unmanaged kiosks - we just won't let them setup new ones). So I'm not sure why people using unmanaged kiosk mode need to be prompted?

sarah.elan@: are you able to determine if your app is running in kiosk mode today? Perhaps that's enough (just make sure your app isn't being run in a regular use session)?
We can determine if the app is running in kiosk mode but would like to also know whether the device is managed. If this could be done with existing APIs that would be great.


Cc: atwilson@chromium.org
atwilson@, could you use https://developer.chrome.com/extensions/enterprise_deviceAttributes#method-getDirectoryDeviceId ? i.e. the lack of that API means either the app was not pushed by policy or the device is not managed?
Good idea - looks like getDirectoryDeviceId() returns a non-empty strong only in the case where the extension is force-installed and the device is enrolled.
That could work, as long as there is no problem with installing an app on an unmanaged device if the app requests the "enterprise.deviceAttributes" permission. Can you confirm that is supported?
Labels: -Type-Bug Type-Feature
Status: Untriaged (was: Unconfirmed)
Status: WontFix (was: Untriaged)
re: comment #10:
based on browsertest [1]:
// Ensure that extensions that are not pre-installed by policy throw an install
// warning if they request the enterprise.deviceAttributes permission in the
// manifest and that such extensions don't see the
// chrome.enterprise.deviceAttributes namespace.

it will show an install warning and chrome.enterprise and/or chrome.enterprise.deviceAttributes will be undefined.

I'm going to close this bug, reopen if that doesn't answer your question. Thanks.

[1]
https://cs.chromium.org/chromium/src/chrome/browser/extensions/api/enterprise_device_attributes/enterprise_device_attributes_apitest.cc?q=enterprise.deviceAttributes&sq=package:chromium&dr=C&l=218

Sign in to add a comment