How to Retrieve Password from Keychain

This used to work in a previous macOS version. However, I can't get it to work in Sequoia 15.5 (24F74).


How can I fix this?

Did you know that in Sequoia macOS introduced a new app called Passwords? I presume that this app is the official way to access passwords and the old way may be deprecated.

Fortunately, there appears to be a command line way to do what you want. I asked ChatGPT to show me an example, and here's what it said:

security find-generic-password -a "account_name" -s "service_name" -w

You could probably use that in an Execute Shell Script action to fetch the value you need.

Thanks. Yes, I did, but KeyChain is still functional. It has not been deprecated. I'll give your method a shot.

ChatGPT for the win!

With its help, I came up with this, and it works great. Replace account_name with the name of your Mac account. Replace service_name with the name of your password.