How to create webhook from REST application with Access token generated from OAuth process using webhook url created from Azure AD? | Adobe Sign

Objective

How to create webhook from REST application with Access token generated from the OAuth process using webhook URL created from Azure AD?

Environment

Adobe Sign REST API V6

Steps

To create webhook directly from Adobe Sign UI, first create webhook URL through Azure AD function apps by using below steps:

  1. Log in through Microsoft account https://portal.azure.com/.

  2. Register for Function Apps under the AzureAD account.

  3. Go to AzureAD and go to Function Apps > Click + icon for Functions.

  4. Select Webhook+API with Javascript as language and click Create Function.

  5. Replace the Index.js file with the following code snippet:

    module.exports = function (context, req) {
        var clientId = req.headers['x-adobesign-clientid'];
        // Validate that the incoming ClientID is genuine
        if (clientId === '************************************') {
            context.res = {
                // status: 200, /* Defaults to 200 */ // any 2XX response is acceptable
                body: {
                    'xAdobeSignClientId' : clientId,
                   
                },
                headers : {
                    'Content-Type' : 'application/json'
                }
            };
        }
        else {
            context.res = {
                status: 400,
                body: "Opps!! Illegitimate Call identified"
            };
        }
        context.done();
    };
  6. Click the Test button on the right corner and provide the following header:

    X-AdobeSign-ClientId as ***********************

  7. Click Save and Run.

  8. Once you receive 200 OK response with the following header, click Get function URL

  9. Copy the URL and go to Adobe Sign UI > Webhooks > Click + icon to create.

  10. Enter the following information: 

    • Name: An intuitive name that other admins can readily understand is suggested.
    • Scope: How wide of a net is the webhook catching. Account and Group are available in the interface.
      The API supports Account, Group, User, and Resource scopes.
    • Only one Scope per webhook can be defined
    • URL: The target URL that Adobe Sign pushed the JSON payload to.
    • Events: The trigger that causes Adobe Sign to build the JSON and push it to the URL.
      Each event builds a different payload relevant to the trigger event
      Multiple Events can be included in one webhook.
    • Notification Parameters: The Notification Parameters identify the sections of the Event JSON payload, allowing you to select only the sections of the Event that are important.

  11. Once the webhook is fully defined, click Save, and the new webhook starts reacting to trigger events immediately.

Get help faster and easier

New user?