1

Is there a way using security find-internet-password or something similar to get my exchange credentials on the command line? I'm trying to write a script to auto-login into an exchange server and I'm sure the data exists somewhere but just unsure how to grab it.

1 Answer 1

1
security find-generic-password -ga <account>

You can find the account by opening Keychain Access, opening the application password (titled Exchange) and looking at the Account field. It should be in the form emailaddress@server e.g. ‘[email protected]@mail.example.com’.

Upon running this command, you will be prompted to allow access to the item in your Keychain, upon which you can Allow or Always Allow.

The password is printed in the last line of the output:

…
password: "abc123"

You must log in to answer this question.

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