OAuth 2.0 is an authorization framework for third-party applications. On behalf of a resource owner, third-party applications like Freshworks use OAuth 2.0 to get limited access to an HTTP service. The framework also enables an approval interaction of the resource owner with HTTP service. In addition, OAuth 2.0 supports direct access to the HTTP services by the third-party application.


To learn more about SSO, refer to these articles below.

How OAuth 2.0 works

  1. If you, the user, haven't already signed in, you will be redirected from the application to your authorization URL, requesting an authorization code. 

  2. Freshworks receives the requested authorization code from the authorization server. 

  3. Freshworks makes a request to your access token URL, exchanging the code obtained for an access token.

  4. Your authorization server will return an access token to Freshworks.

  5.  Freshworks then makes a request to your UserInfo URL with the access token obtained.

  6. Your server will then return the user’s information in JSON format

Step-by-step process on how to configure SSO with OAuth 2.0

  1. Log in using your Org URL and navigate to the Org Dashboard. Click on the security settings in the sidebar. You can define a default security policy that will be applicable for all users in the organization including admins/agents. You can scroll down to turn on the Single Sign-On option and choose OpenID Connect as the login method.

Note: Org Admins are the only ones who can configure SSO. 

Note: You can access the Organization Dashboard by opening the Freshworks Switcher and clicking on your organization link.

  1. You will be presented with the following fields that you need to fill with the information you get from the IdP side:

  • Client Id

  • Client secret

  • Authorization URL (to redirect to the login page of IdP, if not already logged in)

  • Access token URL (to get the user access token)

  • Logout URL (optional - user will be redirected to this page on logout)

  • User info URL (to get the user information based on the access token obtained by invoking the access token URL)


   

  1. Use the Redirect URL provided by Freshworks in your Identity provider configuration.

  2. Click on the Save button.

Params to be shared

Name

Description

Sample Value

Minimum requirement

Client Id

Client Id as generated by IdP

xxxx

Required

Client Secret

Client secret as generated by IdP

xxxx

Required

Logout Redirect URL

URL where the user should be redirected post logout

https://www.freshworks.com

Optional

Login display title

Text that will be displayed on the login button

Login with Awesome Company

Required

Logo URL

Logo to be displayed on the login page. Size should be 36x36 px. Only PNG & SVG is accepted


Optional

Authentication Method

Authentication method to be used while making a call to the token endpoint

POST | BASIC 

Required

Default: BASIC

Authorization Endpoint

URI where the user should be sent to for authorization


Required

Token Endpoint

Endpoint URI that is used to exchange token


Required

User Info Endpoint

Endpoint URI that will be used to fetch user info


Required

Scopes

Scopes that should be used during authorization call


email 

Required

Id Path

Path to Json that holds Id of the user

.id

Required

Email Path

Path to Json that holds the email address of the user

.email

Required

First Name Path

Path to Json holds the first name of the user

.first_name

Optional

Middle Name Path

Path to JSON holds the middle name of the user

.middle_name

Optional

Last Name Path

Path to JSON that holds the last name of the user

.last_name

Optional

Phone Path

Path to JSON that holds the phone number of the user

.phone_number

Optional

Mobile Path

Path to JSON that holds the mobile number of the user

.mobile

Optional

Locale Path

Path to JSON that holds the Locale of the user

.locale

Optional

Job Title Path

Path to JSON that holds the job title of the user

.job_title

Optional

Company Path

Path to JSON that holds the company name of the user

.company

Optional


Note: Once all the configurations are correct on both the sides, the userinfo endpoint URL should mandatorily return sub and email claims. Without these claims, it is not possible for Freshdesk to authenticate the user. 

If you need further assistance, please feel free to write to support@freshworks.com with your queries. We're more than happy to help.