I'm currently using Power Automate Desktop to automate some processes in SAP GUI via a Remote Desktop Protocol (RDP) connection. The issue is that when I disconnect from the RDP session, the automation fails because it loses connection. Unfortunately, I don't have admin rights to adjust any security settings or install necessary workarounds. I doubt that using Power Automate's cloud trigger would help since I need a VPN to access the RDP in the first place. I've tried a few methods like using PowerShell to simulate clicks and executing tscon.exe, but I lack the permissions needed for those. I'm open to any suggestions, temporary or otherwise, that could get this working.
3 Answers
It might be best to ask your admins if they can set up a service user that doesn’t have the same restrictions. This way, you could keep it signed in even after disconnection, which is usually the standard for Microsoft RDP setups.
I've encountered similar problems with automation on RDP sessions. From what I remember, when RDP is disconnected, Windows essentially provides a zero-pixel desktop, meaning there's nothing for automation to interact with. I think Microsoft has some documentation on this. Maybe try connecting to the console session instead? It sometimes allows scripts to run even when not actively connected.
There are documented integrations between Power Automate and SAP systems that might help. The SAP ERP connector works well with Power Automate Desktop for GUI automation. You can automate legacy SAP GUI screens effectively by using UI automation and SAP scripting. Just make sure you're set up to connect via an on-premises data gateway if you're going that route.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures