en-US

Grant access to specific sites to connect to specific USB devices

Supported on: Microsoft Edge version 77, Windows 7 or later

Registry

HKLM Software\Policies\Microsoft\Edge
HKCU Software\Policies\Microsoft\Edge

Options

WebUsbAllowDevicesForUrls text

Description

Allows you to set a list of URLs that specify which sites will automatically be granted permission to access a USB device with the given vendor and product IDs. Each item in the list must contain both devices and URLs for the policy to be valid. Each item in devices can contain a vendor ID and product ID field. Any ID that is omitted is treated as a wildcard with one exception, and that exception is that a product ID can't be specified without a vendor ID also being specified. Otherwise, the policy isn't valid and is ignored. The USB permission model uses the URL of the requesting site ("requesting URL") and the URL of the top-level frame site ("embedding URL") to grant permission to the requesting URL to access the USB device. The requesting URL may be different than the embedding URL when the requesting site is loaded in an iframe. Therefore, the "urls" field can contain up to two URL strings delimited by a comma to specify the requesting and embedding URL respectively. If only one URL is specified, then access to the corresponding USB devices is granted when the requesting site's URL matches this URL regardless of embedding status. The URLs in "urls" must be valid URLs; otherwise, the policy is ignored. This is deprecated and only supported for backwards compatibility in the following manner. If both a requesting and embedding URL are specified, then the embedding URL is granted the permission as top-level origin, and the requesting URL is ignored entirely. If you don't configure this policy, the global default value is used for all sites either from the 'DefaultWebUsbGuardSetting' (Control use of the WebUSB API) policy if it is set, or the user's personal configuration otherwise. URL patterns in this policy shouldn't clash with the ones configured via 'WebUsbBlockedForUrls' (Block WebUSB on specific sites). If there's a clash, this policy takes precedence over 'WebUsbBlockedForUrls' and 'WebUsbAskForUrls' (Allow WebUSB on specific sites). Example value: [ { "devices": [ { "product_id": 5678, "vendor_id": 1234 } ], "urls": [ "https://contoso.com", "https://fabrikam.com" ] } ]