Introducing user-based authentication across Zoho CRM

Introducing user-based authentication across Zoho CRM

We have introduced two enhancements to simplify authentication and enable user-specific access when working with Connections and executing CRM operations across different developer tools. 

1. Enable user-based authentication for Connections

Connections now support user-based authentication, allowing each CRM user to access data through their own account instead of sharing data accessed through the administrator's authentication.  

How does it work?

While creating a Connection, configure the Credential of Login User option:
  1. Yes: Every CRM user who uses the Connection must authenticate with the associated service using their own account.
  2. No: Only the administrative user needs to authenticate. All users share the same authentication, as before.
Choose the option based on whether your integration requires user-specific or shared data access.


Use cases

  1. Retrieve relevant Zoho Desk tickets: When CRM users retrieve tickets from Zoho Desk, individual authentication ensures they access tickets relevant to their own accounts, rather than the admin's.
  2. Retrieve records with the correct ownership: When fetching records from Zoho CRM, individual authentication ensures each user retrieves records they own, rather than records owned by the Connection creator.
Notes
Note

Configuring scopes in a Connection does not automatically grant users the corresponding permissions in Zoho CRM. Users must have the required CRM permissions to perform the respective actions. 

The existing CRM permission controls continue to apply even when user-based authentication is enabled.

2. Execute Zoho CRM APIs using the logged-in user's permissions

You can now execute Zoho CRM APIs using the currently logged-in user's permissions. Unlike user-based authentication for Connections, this does not require users to authenticate. Instead, the API request directly uses their existing Zoho CRM permissions.

To use this in Functions, simply use user: LOGINUSER in invokeAPI. For example, to retrieve Lead records, use:
string button.Fetch_Leads()

string button.Fetch_Leads()
{
    response = invokeapi
    [
        service :zohocrm
        path :"/crm/v8/Leads?fields=Last_Name,Email"
        type :GET
        user:LOGINUSER
    ];
    info response;
    return response;
}

With this configuration, only users who have permission to access the Leads module can retrieve Lead records through the function.

Supported Components and Requirements

User-based access is supported across Functions, Client Scripts, and Widgets, subject to the following requirements:

1. Functions

Function Types
Requirements
Button
Automation
Related List
Standalone
Validation Rule
  1. Deluge functions should use invokeAPI. 
  2. For Java, NodeJS and Python functions, use ZRC. 
  3. If REST API access is enabled for a function, configure Oauth 2.0 authentication and use v8 API version while invoking.

2. Client Script

Use ZRC with v8 or later APIs to enable user-based access in Client Scripts.

3. Widgets

You can enable user-based access in Widgets using either of the following:
  1. ZRC: Use v8 or later version APIs in the latest ZRC version.
  2. JS SDK:  Use v8 or later version APIs. 

Limitations

User-based access is not supported in the following components:
  1. Functions with REST API access enabled and authentication is configured as API key. 
  2. Schedules
  3. Time-based Workflow Rules.
These enhancements are now live and available across all DCs. 

Try them out and share your feedback with us. We would love to hear how they help simplify your authentication and API workflows.

On to Better Building!

cc @Sivaprakash S J