<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z0000ABtZhACQVOkta Classic EngineAuthenticationAnswered2025-08-06T09:00:28.000Z2024-06-30T08:29:46.000Z2024-07-02T14:35:48.000Z

97hgk (97hgk) asked a question.

Using conditional access with Okta to enable access for Salesforce to enforce access only from Chrome or Edge

Hello,

 

I have successfully integrated my Okta instance with my Salesforce instance via SSO. I can login successfully via SP and IdP initiated logins. I am now trying to use conditional access with Okta to enable access for Salesforce to enforce access only from Chrome or Edge.

 

I'm guessing the closest I've gotten to achieving this is by creating an Authentication Policy under: Security => Authentication Policies => Policy Name "Any two factors" Applies to "Salesforce" => Rules => Add rule => AND The following custom expression is true => ?????

 

There is a link to "Expression language reference" and I'm guessing that I should be able to use some syntax that indicates that checks what browser agent I'm using and then proceed with authentication or not for Chrome or Edge?

 

Am I going down the right path? If so, does someone have the proper syntax? I can syntax relating to users, devices, etc. but not browsers or applications.

 

Or is there a better way to achieve this?

 

Thank you,

Shoji


  • Hi @97hgk (97hgk)​ , Thank you for reaching out to the Okta Community! 

     

    I don't currently have the means to test it out myself, but you might be able to set up an Okta Expression Language syntax similar to what is mentioned here , using the browser instead. 

     

    request.userAgent.browser == "CHROMIUM_EDGE" || request.userAgent.browser == "CHROME"

     

    I extrapolated the data from what I'm seeing being registered in the Okta system logs.

    When my user signed in, it generated an event and by filtering it is seems to be referring to the browser property as " client.userAgent.browser eq "CHROME" " .

     

    If my answer helped, remember to mark it as best to increase its visibility for other members of the Okta Community who might have the same questions as you. 

     

    Hope my answer helps! 

     

    --

    Ask Us Anything thru 7/14: Okta WIC leadership want to hear from you

    Expand Post
    Selected as Best
  • Hi @97hgk (97hgk)​ , Thank you for reaching out to the Okta Community! 

     

    I don't currently have the means to test it out myself, but you might be able to set up an Okta Expression Language syntax similar to what is mentioned here , using the browser instead. 

     

    request.userAgent.browser == "CHROMIUM_EDGE" || request.userAgent.browser == "CHROME"

     

    I extrapolated the data from what I'm seeing being registered in the Okta system logs.

    When my user signed in, it generated an event and by filtering it is seems to be referring to the browser property as " client.userAgent.browser eq "CHROME" " .

     

    If my answer helped, remember to mark it as best to increase its visibility for other members of the Okta Community who might have the same questions as you. 

     

    Hope my answer helps! 

     

    --

    Ask Us Anything thru 7/14: Okta WIC leadership want to hear from you

    Expand Post
    Selected as Best
    • 97hgk (97hgk)

      That did it! You're a genius Mihai! Thank you! I created an additional Authentication Policy Rule and set it to Priority 1. I used this in the "The following custom expression is true" field:

       

      request.userAgent == "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"

       

      The "request.userAgent == " part was the part that I could not figure out. I gathered my Chrome browser information from Developer Tools. And set this policy to:

       

      THEN => Access is => Allowed after successful authentication

       

      I then configured the default "Catch-all Rule" to Priority 2 and:

       

      IF => Any request

      THEN => Access:Denied

       

      And it worked perfectly! Chrome was allowed to authenticate via Okta to Salesforce via Chrome but was denied when trying authenticate with Firefox.

       

      Thank you!

      Shoji

      Expand Post
This question is closed.
Loading
Using conditional access with Okta to enable access for Salesforce to enforce access only from Chrome or Edge