Resolving Microsoft Edge Session Conflict in RDP Environments
book
Article ID: 376333
calendar_today
Updated On:
Products
CA Privileged Access Manager (PAM)
Issue/Introduction
When accessing Microsoft Edge in multiple Remote Desktop Protocol (RDP) sessions using the same user credentials, users encounter a failure due to the reuse of the same user data directory. This issue is documented in Chromium and results in conflicts that prevent Edge from launching properly in concurrent sessions.
Environment
PAM 4.1.5
Windows Server with Remote Desktop Services (RDS)
Cause
The issue arises because each RDP session, although using the same credentials, operates independently. Microsoft Edge locks the user profile directory for exclusive use to prevent data corruption. Consequently, when multiple sessions attempt to use the same directory, conflicts occur.
Resolution
To resolve this issue, a workaround involves creating a batch script that generates a unique user data directory for each session. This allows Microsoft Edge to open in multiple sessions without conflicts.
Steps to Implement the Solution
Create a Batch Script (.bat): The batch script should copy the existing Edge user data to a new directory named after the session and launch Edge using this directory.
@echo off for /f "tokens=2 delims==" %%a in ('set ^| findstr "SESSION"') do ( set SESSION_NAME=%%a xcopy "C:\Users\<username>\AppData\Local\Microsoft\Edge\User Data" "C:\Users\<username>\AppData\Local\Microsoft\Edge\%%a" /E /I /Y "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --user-data-dir="C:\Users\<username>\AppData\Local\Microsoft\Edge\%%a" "%1%" )
Convert the Batch Script to an Executable (.exe): Use a tool to convert the .bat file into an .exe file. This executable will be used as the RDP application.
For example: "C:\Program Files (x86)\MYPROGRAMFORACME.exe" https://<site>
Publish the Executable as an RDP Application: Configure the newly created .exe in your PAM or RDP settings as the application to be launched. In RDP Application setup (Services >> RDP Applications) must match with the actual application's launch path of created executable in previous step. This ensures that each session uses its own profile directory.