Thanks Marcel, that's a good idea. That'd work well I think if we needed to store credentials for many different domains. However we only have one domain in our organisation - my concern was around declaring/storing the username and password in plain text in the code, whereas I wouldn't mind doing that for the domain.

However, that said, I wasn't aware until now that the credentials stored in Ensemble could be pulled back in plain text using that code. I assumed as they're obfuscated in the front end that they'd be encrypted in some fashion, but the code Michael provided can be used to trace them out in plain text (or write them out in Terminal). Not as secure as I'd imagined, but still somewhat of a step up from writing them in the method's code.

Thanks for letting me know Katherine, I guess I've just written a method which isn't actually using the adapter at all. I'll check out the %Net.LDAP.Client documentation and see if I can rework it.

Thanks Michael, that's a handy bit of code, worked great :)