Which ispconfig version do you use?
The error abvove means that the function that you try to use is not enabled for the remote user that you used to access the server.
I change $id to $primary_id but I'm not sure what admin value should I put there?
The sample function is correct. By changing the variable, you made the function fail s $primary_id is not set in the example function. The name of a variable does not matter, what matter is onle the value inside the variable, and this value is set to 1 in the example function and has to be set to the primary ID value of the record that you want to retrieve