BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
BruceBrad
Lapis Lazuli | Level 10

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?

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

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.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

View solution in original post

3 REPLIES 3
ChrisHemedinger
Community Manager

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.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
BruceBrad
Lapis Lazuli | Level 10

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?

ChrisHemedinger
Community Manager

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.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1254 views
  • 1 like
  • 2 in conversation