1

What is the process to setup Salesforce Identity Provider to work with a 3rd party like Twilio Flex?

Whenever I try to login, I get this error:

Incorrect HTTP Method

4

To setup Salesforce Idenity Provider to work with Twilio Flex you need to complete these steps:

  1. Create an self-signed certificate
  2. Enable Salesforce Identity Provider
  3. Create Twilio Flex Connected App
  4. Setup SSO in Twilio Flex

Create a self-signed certificate

  1. Setup > Security > Certificate and Key Management
  2. Press Create Self-Signed Certificate button
  3. Give the certificate a Label and Unique Name, I used SalesforceSSO
  4. Key Size of 2048
  5. Exportable Private Key should be ticked
  6. Use Platform Encryption should not be ticked
  7. Press Save button
  8. Press Download Certificate button

Enable Salesforce Identity Provider

  1. Setup > Identity > Identity Provider
  2. Press Enable Identity Provider button
  3. Select SalesforceSSO certificate
  4. Press Save button

Create Twilio Flex Connected App

  1. Setup > Apps > App Manager
  2. Press New Connected App button
  3. Set Connected App Name to Twilio Flex
  4. Set API Name to Twilio_Flex
  5. Set Contact Email to a suitable email address
  6. In the Web App Settings section, set Start URL to https://flex.twilio.com/agent-desktop/
  7. Enable SAML should be ticked
  8. Set Entity Id to https://preview.twilio.com/iam/Accounts/[ACCOUNT_SID]/saml2 remember to replace ACCOUNT_SID, you can find your on the Twilio Project Dashboard
  9. Set ACS URL to the same as Entity Id
  10. Set Subject Type to User ID
  11. Set Name ID Format to urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
  12. Set Issuer to https://yourdomain.my.salesforce.com
  13. Set IdP Certificate to SalesforceSSO
  14. Verify Request Signatures unticked
  15. Encrypt SAML Response unticked
  16. Press Save button
  17. Add a New Custom Attributes
  18. Key of full_name
  19. Value of $User.FirstName + " " + $User.LastName
  20. Add a New Custom Attributes
  21. Key of roles
  22. Value of 'agent' (in quote marks)

Setup SSO in Twilio Flex

  1. Open the Twilio Flex Single Sign-On
  2. Set Friendly Name to SalesforceSSO
  3. Paste in the certificate you downloaded from Salesforce
  4. Set Identity Provider Issuer to https://yourdomain.my.salesforce.com
  5. Set Single Sign-On URL to https://yourdomain.my.salesforce.com/idp/endpoint/HttpRedirect
  6. Set Default Redirect URL to https://yourdomain.my.salesforce.com/idp/endpoint/HttpRedirect
  7. Press Save button

Finally, to use Twilio Flex from Salesforce, open Salesforce and access the phone from the utility bar.

To login using SSO it will ask for your runtime domain which can be found on the Runtime Overview

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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