Has anyone tried the method outlined here?: https://communities.sas.com/t5/SAS-Programming/Gmail-to-suspend-3rd-party-access-soon-SAS-email-alte...
In particular, this requires that two-factor authentication is turned on. Does that mean you have to authenticate with an external device every time you send an email, or does having the app password turn off this requirement?
No, I don't think so -- I believe they are portable. I think device-specific signins is one scenario for which app passwords are designed, so that's part of the doc and setup. But in practice they can be used for scripted apps like this.
The purpose of the app password is to allow an app to send email on your behalf, without triggering the multifactor auth.
You're registering an "app" with Google (Gmail) for the purpose of allowing it to do this action, bypassing the normal interactive authentication process. The app token can be revoked (by you) at any time, and also Google of course can revoke it if there is a security triggered event, meaning you would need to reissue it.
I have used this/tested it with the SAS FILENAME EMAIL method, documented here.
Thanks Chris. I've managed to get it to work. Another question: Are these app passwords linked to a particular computer? The dialog for creating them suggests they might be.
I have a SAS program which sends an email using the filename email method. I've now put the app password in the program (using pwencode). Sometimes I run this program on computer A, and sometimes on computer B. Do I need to setup different app passwords for each computer?
No, I don't think so -- I believe they are portable. I think device-specific signins is one scenario for which app passwords are designed, so that's part of the doc and setup. But in practice they can be used for scripted apps like this.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.