Chuck Tomasi

3 minute read

Step by step instructions for setting up Facebook authentication on a ServiceNow instance. A great use case for this is a government portal to enable single sign-on for citizens who already have a Facebook account.

This document is built on San Diego release.

Configure Facebook

  1. Begin by going to the Facebook Developer Dashboard.

  2. Click Create App in the upper right corner.

    2022-02-17-09-02-14.png

  3. Select Consumer (1) and click Next (2).

    2022-02-17-09-03-03.png

  4. Provide a name for your app (1), add the contact email (2), and click Create App (3).

    2022-02-17-09-06-18.png

  5. Provide your Facebook password when prompted and click Submit.

    2022-02-17-09-07-00.png

  6. Click Set up on the badge labeled Facebook Login from the available products to add to your app.

    2022-02-17-09-08-09.png

  7. Click Web from the choices of platforms.

    2022-02-17-09-08-38.png

  8. Enter your instance URL in the Site URL field (1) and click Save (2).

  9. On the left, under Facebook Login, select Settings (3).

    2022-02-17-09-11-17.png

  10. In the list of Valid OAuth Redirect URIs, enter the following two URLs, replacing “(yourinstance)” with your instance name.

    • https://(yourinstance).service-now.com/navpage.do
    • https://(yourinstance).service-now.com/fb_redirect.do
  11. Click Save Changes.

    2022-02-17-09-13-14.png

  12. Navigate to Settings > Basic on the left (1).

  13. Enter your fully qualified instance name in the field App Domains (2) (e.g. dev79000.service-now.com). Be sure to leave off https://.

  14. Enter your full instance URL in the Privacy Policy URL (3) (e.g. https://dev79000.service-now.com).

  15. Enter the same URL in the Data deletion instructions URL (4).

  16. Click Save Changes (5).

    2022-02-17-09-18-23.png

  17. At the top of the same page, copy the App ID and App secret to some place safe. Treat these like a login and password!

    2022-02-17-09-19-34.png

Install plugins

  1. In your instance, navigate to All > System Applications > All Available Applications.

    2022-02-17-14-17-30.png

  2. Use the search filter to install the plugin Integration - Multiple Provider Single Sign-On Installer. Check the option to load the Demo Data.

    2022-02-17-14-14-39.png

  3. Search for, and install the plugin Approvals with e-Signature.

    2022-02-17-14-15-13.png

Configure the plugins

  1. Navigate to All > Auto Recovery > Properties.

    2022-02-17-14-32-05.png

  2. Uncheck Enable account recovery and Save.

    2022-02-17-14-33-22.png

  3. Navigate to All > Multi-Provider SSO > Administration > Properties.

    2022-02-17-14-28-31.png

  4. Check all three properties and Save.

    2022-02-17-14-34-48.png

Configure the identity provider

  1. Using your browser search, download a Facebook icon. Square, between 125x125px and 500x500px PNG or JPG format works best.

  2. Navigate to All > System UI > Images.

  3. Upload the image and note the URL - only the filename is important (e.g. /FacebookIcon.png.)

  4. Navigate to All > Multi-Provider SOO > Identity Providers.

    2022-02-17-14-26-25.png

  5. Open the record OIDC_Facebook.

  6. Fill in the following field/values:

    • (1) Active: true
    • (2) ServiceNow Homepage: https://(yourinstance).service-now.com/navpage.do
    • (3) Logo URL: (path of the image noted above)
    • (4) Automatically provision users: true
    • (5) Update User on next login: true
    • (6) User roles applied to provisioned users: (choose appropriately)
  7. From the form menu, select Save.

    2022-02-17-14-45-48.png

  8. Select the OIDC Entity tab (1), and open the Facebook record (2).

    2022-02-17-14-46-32.png

  9. Fill in the form with the following field/values:

    • (1) Client ID: (Use the App ID from your Facebook app)
    • (2) Client secret: (Use the App Secret from your Facebook app)
    • (3) Redirect URL: https://(yourinstance).service-now.com/fb_redirect.do
  10. Click Update.

    2022-02-17-14-48-52.png

Test

  1. Use a new browser, or incognito window and navigate to your instance.

  2. Validate you see the Facebook login button.

    2022-02-18-13-43-12.png

  3. Click the button.

  4. Provide your Facebook credentials and click Login.

    2022-02-18-13-44-09.png

  5. Click Continue as (username).

    2022-02-18-13-45-15.png

  6. If successful, you should have a new user provision after providing Facebook authentication and logged into the instance.

  7. From your original browser window (with admin rights), navigate to All > User Administration > Users and verify the new account was created in sys_user with the proper roles assigned.

Happy user logins!


Comments