Many posts and articles, including on this blog, have recommended the use of GMail for sending and receiving mails with Qlik. More recently this has required a switch on the Google Account to Allow Less Secure Apps. Support for this is ending on the 31st May, here’s what you need to know.
Why Use GMail For Sending and Receiving From Qlik?
There are a wide number of features within the Qlik ecosystem that require interaction with email. QlikView Enterprise allows sending of alerts on task failures, NPrinting is all about distributing reports and Qlik Sense SaaS has multiple features for sending mails, from task failure notifications to subscriptions to charts or sheets. Beyond the obvious use cases there are many more reasons why you may interact with a mail server, such as Sending Notifications From The Load Script or even using a mail server as a data source, such as in this example of loading router logs.Many companies use Google Workspace for their internal systems, so using a Workspace account for sending and receiving mail makes sense, and for individuals learning Sense spinning up a GMail account for this purpose is a no cost way of achieving the same result.
Why Allow Access For Less Secure Apps?
Google, and general security best practice, recommend using 2FA for authentication. Google Accounts implement this via Google Prompts (on a signed in phone), text message, the Google Authenticator app or a physical device. Having a third party application (or, ironically, Google’s own email migrate tools) connect to your account via SMTP, IMAP or POP3 is deemed less secure as it inherently uses a username as password only to connect.
The solution for this, for the past couple of years, has been to set a switch on the Google Account that is being used in this way to say that you are comfortable with username and password access to the account in this way. Recently though, a new message has appeared on the dialog where this switch is set:
It advises that this access will be revoked from the 30th of May, and the Find Out More link gives a bit more background, but not quite enough. The long and the short is though, that if you are using GMail servers after this date, without an App Password, they will no longer function correctly.
So, How Do I Fix This?
At the bottom of that article there is a link to information on Signing In With App Passwords, this is a much more helpful document. The steps to resolve the issue are outlined here though.
Head to Account Settings and Security for the account you wish to use
Turn on 2FA for the account you wish to use
Select to create an App Password for this account
Select Other from the app list and enter Qlik Sense or similar
Copy the generated password to your clipboard
Use the App Password as you would your normal password
You can come back into the App Password settings to manage old passwords and remove them when you no longer use them. Note that when you change the password on the account any App Passwords will be removed, so you will need to recreate these and plumb them back in when this happens. Note that you can not recover an old App Password, so make sure you enter it everywhere you need to before you lose it from your clipboard (or put it in your password safe).
Once all of this has been done your Qlik apps and servers can interact with your Workspace or GMail account without issue, and they will continue to do so after the date which Google removes support for less secure apps.
I hope this post helps you avoid any nasty surprises next month.
Hi,
I can not figure out where you see ‘Select to create an App Password for this account’?
Hi Tony – the account needs to have 2FA set up on it first before the App Password option appears. You may need to refresh the page for it to show. It’s in pretty much the same place as where you set up the 2FA. Hope it appears okay for you.
Steve,
Will this work in Qlik Sense Cloud?
Great post by the way.
Hi Aran, good to hear from you!
This will work anywhere you have an app, which is not a Google app and a username and password is required. So in Qlik Sense Cloud, it is required for the SMTP settings in the QMC and for both SMTP and IMAP connectors. Things like Google Drive use an authentication key instead, so this is not required.
Interestingly, I believe that Microsoft have brought in something similar with their Office365 email, but I am not sure this is enforced across all accounts yet.
Hope that helps!