Building a Server Side Application

You can create an extension to provide single sign-on using Zoho CRM to a number of web and mobile applications using SAML and OAuth 2.0 protocols. Read this link  to know more about creating a connected application with any third-party web service. You can also configure SSO to any custom php application that you've created and wish to provide them along with the extension bundle.

There are 3 steps involved in establishing a SAML SSO

This guide will help you add SAML based SSO support to your existing application with minimal or no modification to the existing code, using a sample "Hello World" application as example.

 Create a connected application

Before you configure the SSO settings in your php application, you will have to create a connected app in Zoho Developer Console to get the IdP credentials.

To create a connected app

  1. In the Zoho Developer console homepage, click Extensions for Zoho CRM.
  2. Click Edit below the extension for which your app will be created.
  3. Click Connected App in the left pane of the Extension Details page.
  4. Click Create Connected App.
  5. Provide a name and description for the app.
  6. Choose Hosting : Select Server side application
  7. Specify Base URL : https://<your local_server_site : port_no>, Production URL : https://<your production_site.com>
  8. Click Create.
  9. The connected application will be created and you will be redirected to the Connected App Details page where you can configure SAML Settings.

 Configure SAML settings to the Hello World Application

To connect your custom application with Zoho CRM, you will have to configure the SAML Identity Provider details in your application.

To configure SAML IdP settings to your application

  1. Download the HelloWorld  files from this link to add them to your php project.
  2. Extract the files and keep them in your root folder from the downloaded zip file and rename it as SAML.
  3. Add this folder to your php project.
  4. In your php project, open the file, saml_config.ini from the config subfolder in the saml folder.
    Please note that, this folder name will be a part of your ACS URL and hence the name should be in lowercase.
  5. Update the Entity ID and ACS URL of your application.
    • ACS URL - <https://yourdomainname.com/saml/login.php>
    • Entity ID - <https://yourdomainname.com>
  6. Obtain the IdP, Login and Logout URLs of the connected app you've created and paste it here.
    These details can be obtained from the SAML settings page of your connected app in Zoho Developer Console.

  7. Save and update the saml_config.ini file.
  8. Download the IdP certificate from the Connected App Details page in Zoho Developer Console.
  9. Open the certificate in a word editor and copy the certificate text.
  10. Now, open the cert.pem file from the Resources folder of your application and paste the certificate text and save the file.

 Configure SAML settings in Zoho Developer Console

Once you've configured the SAML settings in your application, copy the Service Provider's Entity ID and ACS URL from the Saml_config.ini file and paste it in Zoho Developer Console.

To configure SP settings in Zoho Developer Console

  1. On the Connected Apps page, click Configure SAML.
  2. Provide the Entity ID, ACS URL, and Start URL obtained from your application.

  3. Select a Subject type and Name ID format from the drop-down list.
  4. Click Save and then click OK.

Now you can configure a launcher for your Connected App. It can either be a web tab or a link in the launcher.

Give a Start URL for the launch link and a logo, if you want to make your Connected App appear in the launcher.