Okta SCIM integration
This guide explains how to configure user synchronization from Okta to Twilio using SCIM provisioning. You can use this integration to provision, update, and deactivate Twilio users based on changes in Okta.
This guide doesn't cover SSO configuration. If you already have an SSO application for Twilio in Okta, skip to Configure SCIM provisioning to add SCIM provisioning to your existing application.
Before you begin, make sure that you have the following:
- An Okta administrator account
- A Twilio user account with the Organization Owner or Organization Admin role
- A verified domain name that matches the hostname of your users' email addresses
Warning
If your organization uses SSO, create an Organization Admin user with SSO deactivated before you begin. You need this user to authenticate the SCIM connection because the OAuth authorization page doesn't support SSO login.
Make an Okta application that will supply user information to Twilio.
- In the Okta Admin panel, go to Applications > Applications, then click Create App Integration.
- For Sign-in method, select SWA - Secure Web Authentication.
- Click Next.
- Configure the application:
- For App name, enter Twilio.
- For App's login page URL, enter
https://www.twilio.com/login. - Select Do not display application icon to users. This hides the application tile from assigned users since it's only used for SCIM provisioning.
- Click Save to create the application.
Update your new Okta application to reflect Twilio-specific SCIM settings.
- From the application's General tab, select SCIM for the Provisioning option.
- Click Save.
- Go to the Provisioning tab that appears.
- Configure the SCIM connection parameters:
- For SCIM connector base URL, enter
https://iam.twilio.com/scim/v2. - For Unique identifier field for users, enter
userName. - Under Supported provisioning actions, select the following options:
- Import New Users and Profile Updates
- Push New Users
- Push Profile Updates
- For SCIM connector base URL, enter
- Click Save.
Create an OAuth application in Twilio to authenticate the SCIM connection from Okta.
- Sign in to the Twilio Console.
- Click Admin in the top-right corner to open the Admin Center.
- Go to Applications > OAuth apps.
- Click Create OAuth application.
- For Grant Type, select Authorization code.
- Fill out the application details:
- For Application name, enter Okta SCIM.
- For Company Name, enter your company name.
- For Redirect URL enter your Okta redirect URI, a URI that will look like
https://system-admin.okta.com/admin/app/cpc/YOUR_OKTA_APP/oauth/callback. See Build your SCIM API service to determine your Okta redirect URI. - For Scopes and Permissions, select all
managed-usersscopes.
- Click Save.
- Copy the Client ID, Client Secret, and Authorization URL. Store the Client Secret securely because it's only shown once.
Supply information about your Twilio OAuth application to Okta.
- Return to your Okta application's Provisioning tab.
- For Authentication Mode, select OAuth 2.
- Configure the OAuth settings:
- Set Access token endpoint URI to
https://oauth.twilio.com/v2/token. - Enter the Authorization endpoint URI, Client ID, and Client Secret from your Twilio OAuth application.
- Set Access token endpoint URI to
- Click Save.
- Click Authenticate with YOUR_OKTA_APP. The Twilio login screen appears.
- Enter your email address and password. Use the organization admin user with SSO deactivated if you created one earlier.
- Review the requested permissions and click Approve access.
After successful authentication, you're redirected to Okta. A green checkmark indicates the connection is valid. You might need to refresh the page to see the checkmark.
Configure your Okta application to push user updates to Twilio.
- Return to your Okta application's Provisioning tab.
- The To App and To Okta subtabs appear.
- In the To App tab, turn on the following options:
- Create Users
- Update User Attributes
- Deactivate Users
- Click Save.
The integration is now active. You can assign users or groups to the application, and their corresponding Twilio users are created, managed, and deactivated by Okta.
To monitor synchronization, open the Application Assignments tab in your Okta app or check the Tasks page in Okta (Admin Panel > Dashboard > Tasks).
If you encounter synchronization errors, try the following steps:
- Check that the OAuth application has the required
managed-usersscopes. - Make sure the Organization Admin user used for authentication hasn't been deactivated.
- In the Okta Admin, check the Tasks page for error messages.