My login flow prevents users from logging in to Salesforce for Outlook. This seems to be due to a bug:

enter image description here

Gorav has suggested here that it "should be possible to bypass the flow for outlook client".

However, I'm not sure how to achieve this. Any help would be much appreciated.


Outlook will send a HTTP request with a User-Agent HTTP header that will identify it as a client. Modify the login flow to look for that header and make decisions in the flow based on that. Unfortunately there's no definitive reference for values of User-Agent sent by different Outlook releases running on multiple platforms. For example, Outlook 2016 on Windows 10 sends this as User-Agent:

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; Microsoft Outlook 16.0.9126; Microsoft Outlook 16.0.9126; ms-office; MSOffice 16)

As you can see, looking for substring "Microsoft Outlook 16.x.yyyy" in this particular User-Agent header will get you what you want. You can experiment with all other Outlook versions and platform variations and get the complete picture of User-Agent in your logs, then use that to create a comprehensive rule in your login flow.

| improve this answer | |
  • Excellent thank you, but what action can I take upon detecting an Outlook login to prevent this issue from occurring? As you can see in the screenshot above, the issue occurs after the flow terminates. – M H May 14 '19 at 21:03
  • At the start of the flow, add this check. If the check criteria are met, exit the flow. That would terminate it. – identigral May 14 '19 at 21:10
  • Unfortunately that doesn't resolve the issue. I tried setting the flow to go to a decision element with no outcomes (for testing purposes) - the same issue occurred. I also tried setting the flow to go to a decision element, and then directly to a screen with a 'finish' button. Clicking the 'finish' button doesn't end the login process - it just tries to load something indefinitely. Any other ideas? Is there another way to exit the flow? – M H May 14 '19 at 21:51
  • Exit the flow by redirecting them wherever you want them to go (versus this login page). help.salesforce.com/… – identigral May 14 '19 at 22:17
  • So I tried following the instructions in this article to set up a Lightning component that uses the navigateToSObject Lightning event to redirect flow users to a particular record. I then created a 'core action' within the login flow to launch the Lightning component. However, this didn't resolve the issue. – M H May 26 '19 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.