Here the response from Sitecore support:
According to the investigation performed, the App.MapWhen cannot be
used in this method, since it implies direct interaction with OWIN
middleware and bypasses federated authentication layer. Thus,
implementation of your desired functionality would require a lot of
customization and, unfortunately, falls out of scope ...