Okta Workforce: Twilio SMS with Workflows

Okta enforces customers to use the Telephony Inline Hook for using SMS or phone for MFA. Since Okta provides Workflows with the low latency setting, it can be used in combination. This guide explains how to set up Twilio and Okta to support the Telephony Inline Hook together with Workflows.

This article guides you through 3 topics to set-up Twilio as your SMS OTP provider inside the Okta Workforce Identity Cloud (WIC):

  1. Set-up a Twilio 
  2. Set-up Okta Workflows
  3. Set-up Okta

The screenshots are showing the Okta Identity Engine (OIE), but this guide will also work with Okta Classic

Set-up Twilio 

First start with configuring your messaging service on Twilio: 

  1. Login to Twilio or create a new free trial 
  2. [Phone Numbers → Manage] Buy a phone number (make sure its supporting SMS)
  3. [Messaging → Services] Create a new messaging service some text
    1. Usage: Verify users
    2. Select your purchased phone number
    3. Defer to sender's webhook
    4. Add Compliance information if necessary
    5. Copy your Messaging Service SID
  4. Go back to https://console.twilio.com and
    Copy your Account SID
    Copy your Auth Token

Set-up Okta Workflows 

Next set up the workflow on Okta Workflows: 

  1. [Connections → New Connection] Add a new API Connectorsome text
    1. Name: Twilio
    2. Auth Type: Basic
    3. Password: Auth Token from Twilio
    4. Username: Account SID from Twilio
  1. [Flows → New Flow] Create a new flow and follow this example or import the flow from below
Okta Workflows: Flow for Telephony Inline Hook against Twilio


Copy your Invoke URL

  1. Alternatively download this flowpack: Flowpack
    1. Import the flowpack
    2. Edit the flow and change the following values
      1. Add your Messaging Service SID from Twilio
      2. Add your Account SID from Twilio 
      3. Choose your created API Connector from above
      4. Save and enable this Flow

Go to endpoint settings and copy your Invoke URL

Set-up Okta

The last step is to configure Okta to use the Telephony Inline Hook against Okta Workflows: 

  1. Login to your Okta Admin Dashboard
  2. [Workflow → Inline Hooks] Add a new Inline Hook with the type Telephony
  3. URL: The Invoke URL from Workflows 
  4. Save and try it out on the tab Preview