I think you can just request this information directly from your LDAP server.
In you shinyproxy environment variable, you do have access to SHINYPROXY_USERNAME by a call userId <-
I’m using the following code to retrieve the LDAP groups. Depend on the structure of you LDAP directories, the code might be slightly different. You need to figure out what is the key word in your LDAP for user id when you request groups. In my case, it’s ‘memberUid’. Note that a user could be in different groups.
ldapResult <- RCurl::getURL(ldapUrl)
groups.v <- unlist(stringr::str_split(ldapResult, "\n\n\n"))
m <- regexpr("cn: .+?$", groups.v, perl = TRUE)
gsub("cn: ", "", regmatches(groups.v, m))