chrome.enterprise.deviceAttributes
Description: |
Use the chrome.enterprise.deviceAttributes API to read device
attributes.
Note: This API is only available to extensions force-installed by enterprise policy.
|
Availability: |
Since Chrome 46.
|
Permissions: |
"enterprise.deviceAttributes"
|
Important: This API works only on Chrome OS.
Note: This API is only for extensions pre-installed by policy.
Summary
Methods | |
---|---|
getDirectoryDeviceId −
chrome.enterprise.deviceAttributes.getDirectoryDeviceId(function callback)
| |
getDeviceSerialNumber −
chrome.enterprise.deviceAttributes.getDeviceSerialNumber(function callback)
| |
getDeviceAssetId −
chrome.enterprise.deviceAttributes.getDeviceAssetId(function callback)
| |
getDeviceAnnotatedLocation −
chrome.enterprise.deviceAttributes.getDeviceAnnotatedLocation(function callback)
| |
getDeviceHostname −
chrome.enterprise.deviceAttributes.getDeviceHostname(function callback)
|
Methods
getDirectoryDeviceId
chrome.enterprise.deviceAttributes.getDirectoryDeviceId(function callback)
Fetches the value of the device identifier of the directory API, that is generated by the server and identifies the cloud record of the device for querying in the cloud directory API. If the current user is not affiliated, returns an empty string.
Parameters | |||||
---|---|---|---|---|---|
function | callback |
Called with the device identifier of the directory API when received. The callback parameter should be a function that looks like this: function(string deviceId) {...};
|
getDeviceSerialNumber
chrome.enterprise.deviceAttributes.getDeviceSerialNumber(function callback)
Since Chrome 66.
Fetches the device's serial number. Please note the purpose of this API is to administrate the device (e.g. generating Certificate Sign Requests for device-wide certificates). This API may not be used for tracking devices without the consent of the device's administrator. If the current user is not affiliated, returns an empty string.
Parameters | |||||
---|---|---|---|---|---|
function | callback |
Called with the serial number of the device. The callback parameter should be a function that looks like this: function(string serialNumber) {...};
|
getDeviceAssetId
chrome.enterprise.deviceAttributes.getDeviceAssetId(function callback)
Since Chrome 66.
Fetches the administrator-annotated Asset Id. If the current user is not affiliated or no Asset Id has been set by the administrator, returns an empty string.
Parameters | |||||
---|---|---|---|---|---|
function | callback |
Called with the Asset ID of the device. The callback parameter should be a function that looks like this: function(string assetId) {...};
|
getDeviceAnnotatedLocation
chrome.enterprise.deviceAttributes.getDeviceAnnotatedLocation(function callback)
Since Chrome 66.
Fetches the administrator-annotated Location. If the current user is not affiliated or no Annotated Location has been set by the administrator, returns an empty string.
Parameters | |||||
---|---|---|---|---|---|
function | callback |
Called with the Annotated Location of the device. The callback parameter should be a function that looks like this: function(string annotatedLocation) {...};
|
getDeviceHostname
chrome.enterprise.deviceAttributes.getDeviceHostname(function callback)
Since Chrome 82.
Fetches the device's hostname as set by DeviceHostnameTemplate policy. If the current user is not affiliated or no hostname has been set by the the enterprise policy, returns an empty string.
Parameters | |||||
---|---|---|---|---|---|
function | callback |
Called with hostname of the device. The callback parameter should be a function that looks like this: function(string hostname) {...};
|