At first this seemed like a simple configuration change, unfortunately it took me some time to figure it out and I had to ask help from my developer colleges.
Most of this is documented in UiPath documentation but I ran into some difficulties.
On the Authentication page of your application registration in Azure you must tick ID tokens checkbox.
After that wee need to configure and add some additional fields in web.config file (located in Configuration pane) of UiPath application in Azure
These settings define that we want to integrate Azure AD with UIPath authentication process and also define that we will map upn (http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn) of Azure AD user to username (ByUserName) of local UiPath user created in the application.
So now, when we create new user in UiPath and set his username to be his upn, it should successfully authenticate and login to UiPath.
Unfortunately, this does not work as intended. It seems that UiPath is looking at email field of user instead in his username. So be sure to add email to UiPath user that is same as upn of his Azure AD account.