30

I want to find a way to share some Microsoft RDP configuration information with my team.

Where does Microsoft RDP 8 for Mac store its connections and configuration?

2 Answers 2

39

If you want to share a configuration you can select the target under My Desktops and either right-click and select Export or from the Microsoft Remote Desktop File menu select Export.

The file that contains the information shown in the Microsoft Remote Desktop window, sans any passwords which are stored in your Keychain, is located at:

/Users/$USER/Library/Containers/com.microsoft.rdc.mac/Data/Library/Preferences/com.microsoft.rdc.mac.plist

For MS RDP 10, I had to copy two folders: /Users/~/Library/Containers/com.microsoft.rdc.mac /Users/~/Library/Containers/Microsoft Remote Desktop

Hope this helps...

10
  • Cannot seem to find this folder in High Sierra?
    – Brian D
    Commented Nov 21, 2017 at 19:24
  • 1
    @Brian D, While one certainly can access it from Terminal, nonetheless it is still accessible from Finder. Press the Option key while clicking the Go menu in Finder and Library will appear. Commented Nov 21, 2017 at 20:24
  • 4
    @BlackSheep, Passwords are stored in the User's Keychain and can be seen in the Keychain Access.app in /Applications/Utilities/. Commented May 29, 2018 at 19:33
  • 1
    how does one import this into the new RDP 10.?
    – dresh
    Commented Aug 17, 2018 at 7:41
  • 1
    For RDP 10, there is a file named: com.microsoft.rdc.macos.plist - note macos instead of mac. Tried replacing the file with a backup after deleting some profiles and didn't restore.
    – Efren
    Commented Dec 7, 2020 at 1:08
0

As an answer to the comments elsewhere in this question, here's a small program msrdp-credential-dumper that retrieves MS-RDP connections and their stored passwords from the macOS Keychain. Visit the GitHub repo luckman212/msrdp-credential-dumper to download.

Sample output

Source

DB="$HOME/Library/Containers/com.microsoft.rdc.macos/Data/Library/Application Support/com.microsoft.rdc.macos/com.microsoft.rdc.application-data.sqlite"
[[ -r $DB ]] || { echo 1>&2 "database could not be accessed"; exit 1; }

MAXCOLS=$(tput cols)
[[ -n $MAXCOLS ]] || MAXCOLS=80
export C1=$(( MAXCOLS / 4 ))
export C2=$(( MAXCOLS / 5 ))

( tput bold ; tput smul ;
    printf "%-${C1}s %-${C2}s %s\n" Name Hostname 'Username/Password' ;
    tput sgr0 ;
    while IFS='|' read -r B_ZFRIENDLYNAME B_ZHOSTNAME C_ZID C_ZUSERNAME _ ; do
        PASSWD=$(security 2>/dev/null find-generic-password -w -s com.microsoft.rdc.macos -a "$C_ZID")
        printf "%-${C1}s %-${C2}s %s\n" "${B_ZFRIENDLYNAME:0:$C1}" "$B_ZHOSTNAME" "${C_ZUSERNAME:--}${PASSWD:+ / $PASSWD}"
    done < <(sqlite3 "$DB" <<-EOS
    SELECT
        b.ZFRIENDLYNAME,
        b.ZHOSTNAME,
        c.ZID,
        c.ZUSERNAME
    FROM
        ZBOOKMARKENTITY as b
    LEFT JOIN ZCREDENTIALENTITY as c on b.ZCREDENTIAL = c.Z_PK
    ORDER BY b.ZFRIENDLYNAME
    EOS
    )
)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .