MicrosoftEdge / MicrosoftEdge/WebView2Feedback
[Problem/Bug]: WebView creation fails when app is started using "Run as administrator" and explicit admin credentials
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
What happened?
I have the following scenario: my machine has two accounts
- "michael" who is a local admin
- "basil" who is a standard user
My app was installed by "michael" for all users using elevated rights.
Now "basil" logs in. He rights-click on our app-icon and selects "Run as administrator". He now enters the credentials from "michael". The app start fails with this error message from WebView2:
We set the UserDataFolder of WebView2 to a LocalAppData-Path of the running user (which in this case is "michael"). But it seems that child processes of WebView2 don't use the same user. In fact they run under the "basil" user as can be seen here:
My expectation would be that the child processes get launched with the same user as the app that contains the WebView2.
Can you clarify if this is expected behavior or if this is a bug?
Importance
Moderate. My app's user experience is affected, but still usable.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
126.0.2592.87
SDK Version
1.0.1518.46
Framework
Win32
Operating System
Windows 10, Windows 11
OS Version
10.0.26120
Repro steps
The problem should be reproducible with any app using WebView2. It just depends on the described admin/non-admin user scenario.
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
No, this never worked
Last working version (if regression)
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported administrator/non-administrator reproduction scenario using WebView2 Runtime 126.0.2592.87 and SDK 1.0.1518.46 on Windows 10 or 11. Compare the app and WebView2 child-process identities, then establish whether the behavior is expected or a confirmed bug; the issue is done when that outcome and any supported guidance are documented.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100