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
Availability
Types
NetworkDetails
Properties
-
ipv4
string optional
The device's local IPv4 address (undefined if not configured).
-
ipv6
string optional
The device's local IPv6 address (undefined if not configured).
-
macAddress
string
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
-
callback
function optional
The
callback
parameter looks like:(networkAddresses: NetworkDetails) => void
-
networkAddresses
-
Returns
-
Promise<NetworkDetails>
Chrome 96+Promises are only supported for Manifest V3 and later, other platforms need to use callbacks.