The Focus window action can't bring a specific window to focus

This article provides a workaround to solve the issue that the "Focus window" action fails to bring a window to focus in Microsoft Power Automate.

Applies to:   Power Automate
Original KB number:   5001203


UI automation actions can't focus on a window. Depending on the nature of the app, a "Focus window" action may not be able to bring the window to focus. Even if the window is in the foreground, the focus may not be on the window, causing subsequent actions to fail.

Verifying issue

To verify that the "Focus window" action can't bring the window to focus, you can send some keystrokes on the window by using the "Send keys" action. If the window isn't focused, the keystrokes won't be sent to the right place.


To work around this issue, you can send a click on the window. In addition to the "Focus window" action, send a click afterwards to make sure that the window becomes focused. The following actions can be used to send a click on a window: