On Windows PowerShell and other admin-related topics

Starting an RemoteApp through RD Web Access and RD Gateway fails with “The logon attempt failed”

In Windows Server 2008 R2, it`s possible to use RD Web Access and RD Gateway for starting RemoteApp applications, using Single Sign-On (SSO).
The Remote Desktop Services Team has a great article here on how to configure this setup.

While troubleshooting a problem with the SSO-feature lately, we got an error message saying “The logon attempt failed”.

The solution turned out to be rather simple. While the default logon page for RD Web Access indicates “Domain/user name” for the user name field, using only the user name works fine:



This works fine as long as your not using RD Gateway and SSO, then the error message mentioned will occur when trying to start a RemoteApp.
When RD Gateway and SSO are being used, you must supply the domain as part of the user name (domain\ user name), else the SSO-feature will break.

I actually contacted Microsoft to clarify if it is possible to hardcode the domain name some way, and got the following answer:

I have taken time to discuss with our develop team. Please understand that there is no easy way to finish the task, because in RemoteApp mode RDP client ignores user name and domain name. We need to put a domain hint on the RD Web page. It is related to coding and design. If you want to request a feature or code change, you also can contact our Advisory Service by using the contact info published at <>.

Hopefully this will be possible in future Service Packs or OS releases.


September 17, 2010 - Posted by | Remote Desktop Services, Windows Server 2008 R2 | ,


  1. Where there is a will, there is away. When I read your post I was concerned, as I didn’t want my users to have to enter the domain, seems kind of foolish when there is only one. Anyhow, if you edit the renderscripts.js file and add “‘domainname\\’ +” (without the double quotes) before all the places the login name get’s set as a string, for example:

    decordURIComponent(getCookieCrumbValue(strCookieContents, “Name”));



    Now keep in mind I’ve tested this for all of about 30 seconds, but so far so good 🙂

    Comment by Josh | April 15, 2011 | Reply

    • Hi Josh,
      Your above posted is abit unclear in relation to setting the domain name in the renderscripts file.

      Can you clearify it with an example please ?

      Thanks Ben.

      Comment by Ben | June 30, 2011 | Reply

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: