Microsoft RDP Client Error on Mac

When connecting using Microsoft Remote Desktop from a Mac to a remote PC, you might experience the following error:

There are no Client Access Licenses available for the target remote computer (code LicenseNoLicense(258))

Most IT departments knows how to fix this; for Windows. This involves deleting registry keys, but you don't have them on a Mac. Instead, you need to clear out some cache files on the file system by performing the following steps:

  1. Open Terminal
  2. Enter (or copy and paste this) cd ~/Library/Containers/\ Support/Microsoft\ Remote\ Desktop/
  3. List the directory using the li command. You should now see all folders.
  4. Delete all folders except for logs and printerconfig. Do this by copying each folder name (in a GUID format) and using the following delete command:
    rm -r -f [directoryname]
    For example:
    rm -r -f {b58e9e06-2ea5-4ed6-944c-d52dd8cf58fb}

Hope this helps others with the same issue!