Grant access to specific sites to connect to specific USB devices
Cette stratégie n'a pas de traduction française dans les modèles de l'éditeur ; le texte original est en anglais.
Explication
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"
]
}
]
Registre
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\EdgeHKEY_CURRENT_USER\Software\Policies\Microsoft\Edge- Nom de la valeur
- non défini dans l'ADMX
Valeurs d'activation / désactivation : non défini dans l'ADMX (voir les options ci-dessous).
PowerShell
Commandes PowerShell qui écrivent dans le registre ce que la stratégie écrirait. Les valeurs entre chevrons (<…>) sont à remplacer.
Écrire directement dans le registre contourne la stratégie de groupe : si une GPO gère cette valeur, elle sera réécrite au prochain gpupdate ; sinon la valeur reste en place (effet « tatouage »). Préférez une GPO ou, en local, LGPO.exe. Exécutez PowerShell en administrateur pour HKLM. Certaines stratégies demandent un redémarrage ou gpupdate /force.
Ordinateur (HKLM)
Activer
# Activer : msedge/WebUsbAllowDevicesForUrls
$k = 'HKLM:\Software\Policies\Microsoft\Edge'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Grant access to specific sites to connect to specific USB devices
Set-ItemProperty -Path $k -Name 'WebUsbAllowDevicesForUrls' -Value '<valeur>' -Type StringDésactiver
# Désactiver : msedge/WebUsbAllowDevicesForUrls
# Aucune valeur n'est écrite à l'état « Désactivé » (rien de défini dans l'ADMX)Revenir à « Non configuré »
# Revenir à « Non configuré » : msedge/WebUsbAllowDevicesForUrls
$k = 'HKLM:\Software\Policies\Microsoft\Edge'
Remove-ItemProperty -Path $k -Name 'WebUsbAllowDevicesForUrls' -ErrorAction SilentlyContinueUtilisateur (HKCU)
Activer
Désactiver
Revenir à « Non configuré »
Options (1)
| Libellé | Contrôle | Valeur de registre | Type REG | Contraintes / détails |
|---|---|---|---|---|
| Grant access to specific sites to connect to specific USB devicesWebUsbAllowDevicesForUrls | Zone de textetext | WebUsbAllowDevicesForUrls | REG_SZ | Longueur max : 1000000 |
Application
Microsoft Edge (+ Edge Update, WebView2) (Microsoft) — modèles de novembre 2026
Modèles officiels téléchargés le 12 novembre 2026.