MicrosoftEdge / MicrosoftEdge/WebView2Feedback

How to revoke permission to open links in an app

Open
#4,549 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug tracked
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Discussed in https://github.com/MicrosoftEdge/WebView2Feedback/discussions/4479

Originally posted by exaiwitmx April 9, 2024
If you have granted the permission to always open specific links in an app, how do you revoke this permission?

image

What I've already tried:

  1. WebView2.CoreWebView2.Profile.GetNonDefaultPermissionSettingsAsync()
    => No effect.

  2. WebView2.CoreWebView2.Profile.GetNonDefaultPermissionSettingsAsync() with all CoreWebView2BrowsingDataKinds enumeration values OR-ed.
    => No effect.

  3. WebView2.CoreWebView2.Profile.GetNonDefaultPermissionSettingsAsync()
    => Returns nothing.

  4. Delete User Data Folder recursively by means of System.IO.Directory.Delete.
    => Actually removes the permission. But I don't want to do that for several reasons - including the problem that part of the User Data Folder might be locked (e.g. by other instances of my application) and therefore cannot be deleted.

I use version 1.0.2420.47 of the Microsoft.Web.WebView2 nuget package:
image

AB#50723049

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked discussion 4479 and the reported WebView2 APIs: CoreWebView2.Profile.GetNonDefaultPermissionSettingsAsync and CoreWebView2BrowsingDataKinds. Compare their behavior with deleting the User Data Folder, and determine whether a supported targeted revocation path is documented or needs to be added.

Written by the indexing model from the issue text.

Assessment

Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.