chrome.enterprise.networkingAttributes
Important: This API works only on Chrome OS
- Description
Use the
chrome.enterprise.networkingAttributes
API to read information about your current network. Note: This API is only available to extensions force-installed by enterprise policy. - Permissions
enterprise.networkingAttributes
Note: This API is only for extensions pre-installed by policy.
Summary
- Types
- Methods
chrome.enterprise.networkingAttributes.getNetworkDetails(callback: function)
Types
NetworkDetails
Properties
- ipv4string optional
The device's local IPv4 address (undefined if not configured).
- ipv6string optional
The device's local IPv6 address (undefined if not configured).
- macAddressstring
The device's MAC address.
Methods
getNetworkDetails
chrome.enterprise.networkingAttributes.getNetworkDetails(callback: function)
Retrieves the network details of the device's default network. If the user is not affiliated or the device is not connected to a network, runtime.lastError
will be set with a failure reason.
Parameters
- callbackfunction
Called with the device's default network's
NetworkDetails
.The callback parameter should be a function that looks like this:
(networkAddresses: NetworkDetails) => {...}
- networkAddresses