According to provided screenshots, the SAP automation issues are caused by saplogon.exe running elevated (value on Elevated column is Yes) and UiPath Studio/Robot running with standard privileges (value on Elevated column is No).
The solution is to run both, saplogon.exe and UiPath Robot/Studio, with same elevation level (value on Elevated column should be the same).
So, please run SAP WinGUI (saplogon.exe process) non-elevated and let us know if SAP automation works as expected.
RemoteException wrapping System.AggregateException: One or more errors occurred. (Access is denied.) —> RemoteException wrapping System.ComponentModel.Win32Exception: Access is denied.
at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
at System.Diagnostics.Process.GetOrOpenProcessHandle()
at System.Diagnostics.Process.EnsureWatchingForExit()
at UiPath.Service.UserHost.AttendedServiceProxy.RegisterClientProcess(Int32 clientPid)
at UiPath.Service.UserHost.StudioOperations.Prepare(ClientProcessMessage message, CancellationToken ct)
at UiPath.Service.Core.Utils.TaskUtils.WithShortWait(Task task, TimeSpan wait)
at UiPath.Service.UserHost.StudioOperations.<>c__DisplayClass7_0.<b__0>d.MoveNext()
— End of stack trace from previous location —
at UiPath.CoreIpc.CancellationHelper1.Invoke[TResult](TId requestId, Func2 func)
at UiPath.CoreIpc.Server.<>c__DisplayClass7_3.<<-ctor>g__InvokeMethod|6>d.MoveNext()
— End of stack trace from previous location —
at UiPath.CoreIpc.Server.<>c__DisplayClass7_1.<<-ctor>g__HandleRequest|3>d.MoveNext()
— End of stack trace from previous location —
at UiPath.CoreIpc.Server.<>c__DisplayClass7_2.<<-ctor>b__5>d.MoveNext()
— End of stack trace from previous location —
at UiPath.CoreIpc.Helpers.Timeout[TResult](TimeSpan timeout, List1 cancellationTokens, Func2 func, String message, Func2 exceptionHandler) --- End of inner exception stack trace --- at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited) at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited) at System.Diagnostics.Process.GetOrOpenProcessHandle() at System.Diagnostics.Process.EnsureWatchingForExit() at UiPath.Service.UserHost.AttendedServiceProxy.RegisterClientProcess(Int32 clientPid) at UiPath.Service.UserHost.StudioOperations.Prepare(ClientProcessMessage message, CancellationToken ct) at UiPath.Service.Core.Utils.TaskUtils.WithShortWait(Task task, TimeSpan wait) at UiPath.Service.UserHost.StudioOperations.<>c__DisplayClass7_0.<<RunJob>b__0>d.MoveNext() --- End of stack trace from previous location --- at UiPath.CoreIpc.CancellationHelper1.Invoke[TResult](TId requestId, Func2 func) at UiPath.CoreIpc.Server.<>c__DisplayClass7_3.<<-ctor>g__InvokeMethod|6>d.MoveNext() --- End of stack trace from previous location --- at UiPath.CoreIpc.Server.<>c__DisplayClass7_1.<<-ctor>g__HandleRequest|3>d.MoveNext() --- End of stack trace from previous location --- at UiPath.CoreIpc.Server.<>c__DisplayClass7_2.<<-ctor>b__5>d.MoveNext() --- End of stack trace from previous location --- at UiPath.CoreIpc.Helpers.Timeout[TResult](TimeSpan timeout, List1 cancellationTokens, Func2 func, String message, Func2 exceptionHandler)
That error appears because some UiPath components run elevated and others run non-elevated. In Task Manager you can see that there is a mix of "Yes" and "No" under "Elevated" column for different UiPath processes.
Can you try to run SAP WinGUI non-elevated (value in Elevated column should be “No”) ? In my opinion this is the straight and easy way to a reliable solution.