After spending many hours trying to resolve a Mac OSX system remoting to a 2012 R2 RDS/TS Server, we have found the fix.
When remoting in you may get the following error:
Cannot RDP using OSX. RpcOverHttpEndpointException: 2, Your connection was denied because of a Resource Access Policy (TS_RAP). Please contact your server administrator
This error is with Microsoft Remote Desktop on a Mac with version 8.0.28 that had been upgraded from 8.0.26.
Interestingly we didn’t have the problem on a fresh client that had 8.0.28 installed fresh and not upgraded from an earlier version.
Navigate and delete or move the following folder: (NOTE: doing so will delete all your preconfigs saved currently)
Then the next time that you load the client, you get a completely fresh client version, including first run prompts etc. You will need to re-create the profile and gateway however.
After doing that, we no longer get the ‘login failed’ popup.
It seems that something in the version upgrade doesn’t correctly upgrade the settings files, causing the issue. But a fresh setup works.
We haven’t yet found out exactly which file causes the issue however we have tested and can confirm this fix allows the system to connect and work.
Credit: Tony “tbigby” Bigby