Edit

Share via


FileOrDirectoryPickerWithoutGestureAllowedForOrigins

Allow file or directory picker APIs to be called without prior user gesture

Supported versions

  • On Windows and macOS since 123 or later

Description

For security reasons, the showOpenFilePicker(), showSaveFilePicker() and showDirectoryPicker() web APIs require a prior user gesture ("transient activation") to be called or will otherwise fail.

If you enable this policy, admins can specify origins on which these APIs can be called without prior user gesture.

For detailed information on valid url patterns, please see https://go.microsoft.com/fwlink/?linkid=2095322. * is not an accepted value for this policy.

If you disable or don't configure this policy, all origins will require a prior user gesture to call these APIs.

Supported features

  • Can be mandatory: Yes
  • Can be recommended: No
  • Dynamic Policy Refresh: Yes
  • Per Profile: Yes
  • Applies to a profile that is signed in with a Microsoft account: No

Data type

  • List of strings

Windows information and settings

Group Policy (ADMX) info

  • GP unique name: FileOrDirectoryPickerWithoutGestureAllowedForOrigins
  • GP name: Allow file or directory picker APIs to be called without prior user gesture
  • GP path (Mandatory): Administrative Templates/Microsoft Edge
  • GP path (Recommended): N/A
  • GP ADMX file name: MSEdge.admx

Example value

https://www.example.com
[*.]example.edu

Registry settings

  • Path (Mandatory): SOFTWARE\Policies\Microsoft\Edge\FileOrDirectoryPickerWithoutGestureAllowedForOrigins
  • Path (Recommended): N/A
  • Value name: 1, 2, 3, ...
  • Value type: List of REG_SZ

Example registry value

SOFTWARE\Policies\Microsoft\Edge\FileOrDirectoryPickerWithoutGestureAllowedForOrigins\1 =

https://www.example.com

SOFTWARE\Policies\Microsoft\Edge\FileOrDirectoryPickerWithoutGestureAllowedForOrigins\2 =

[*.]example.edu

Mac information and settings

  • Preference Key name: FileOrDirectoryPickerWithoutGestureAllowedForOrigins
  • Example value:
<array>
  <string>https://www.example.com</string>
  <string>[*.]example.edu</string>
</array>

See also