REFRACT Platform Connector for Power Platform

REFRACT Platform Connector for Power Platform

Connect Power Automate and Power Apps to your organization's REFRACT Platform Dispatcher. Generate PDFs, send documents for e-signature and approval workflows, and retrieve sealed documents - without writing code.

From Connector Installation to First Document Flow: Four Steps.

No database to provision. No portal to build or host. No separate identity system.

REFRACT Platform deploys into your existing Microsoft environment and uses services you already govern - Azure, SharePoint, Dataverse, and Microsoft Entra ID.

  1. Provision Storage: SharePoint libraries and configuration are created automatically by your Dispatcher deployment
  2. Install the Connector: Add the REFRACT Platform Connector to your Power Platform environment
  3. Create a Connection: Enter your Dispatcher URL and the client credentials your IT admin provisioned for the connector
  4. Build Your First Flow: Use the Generate Document action in any Power Automate flow and generate your first document

Overview

The REFRACT Platform Connector for Microsoft Power Platform lets Power Automate flows and Power Apps generate PDFs, trigger e-signature and approval workflows, and retrieve sealed documents - all connected to your organization's self-hosted REFRACT Platform Dispatcher.

Key characteristics:

  • No coding required - pre-built actions in Power Automate and Power Apps
  • Self-hosted - connects to your organization's own Dispatcher, not a shared service
  • OAuth 2.0 client credentials - each connection is created with a Dispatcher URL and an Azure AD app registration's tenant ID, client ID, client secret, and scope; there is no interactive user sign-in
  • Data sovereignty - documents are generated and stored in your Azure tenant; REFRACT eSign and REFRACT Workflow use a REFRACT-hosted portal to reach signers and recipients
REFRACT Platform Connector for Power Platform: solution overview showing Power Automate flows, platform services, and SharePoint storage with audit trails

A Different Kind of Connector

Most document connectors are tightly coupled to specific document types. Adding a new document type means updating the connector, redeploying it, and rebuilding flows. REFRACT Platform is architected differently.

Why REFRACT Platform works differently

In REFRACT Platform, the payload drives behaviour and the template drives rendering. The connector has no knowledge of document types - it simply delivers your payload to the Dispatcher, which resolves the correct template, features, and workflow from the schema. This means you can introduce new document types, templates, and workflows without ever touching the connector or rebuilding flows.

The four connector actions cover the entire document lifecycle regardless of how many document types your organization manages:

ActionWhat it does
Generate DocumentRender any PDF from any template with any payload. The same action drives plain rendering, e-signature, and approval workflows - behavior is controlled by the templateSettings you send, not by calling a different action
Check Workflow StatusPoll any approval or signature workflow
Download Sealed PDFStream the bytes of any completed signed document
Get Document URLStream the bytes of any stored document by blob path

Authentication Model

The REFRACT Platform Connector uses OAuth 2.0 client credentials (app-to-app), not an interactive user sign-in.

Creating a connection requires five values: the Dispatcher URL, and the tenant ID, client ID, client secret, and OAuth scope of an Azure AD app registration your IT admin sets up for the connector. The connector's own code acquires a fresh access token from Azure AD for every request using these values, then forwards the request to the Dispatcher with that token as a Bearer credential. There is no per-user sign-in window and no token refresh to manage - each call re-authenticates with the stored client credentials.

Tenant Isolation

Before processing any request, the Dispatcher validates three JWT claims - issuer (iss), audience (aud), and tenant ID (tid). All three must match. A token that passes issuer and audience validation but contains a different tenant ID is rejected, preventing cross-tenant access.

Flow runs an action
    │
    ├── Power Platform reads the connection's stored parameters
    │     (Dispatcher URL, Tenant ID, Client ID, Client Secret, Scope)
    │
    ├── Connector's script acquires an Azure AD token via
    │     grant_type=client_credentials using those values
    │
    └── Request forwarded to Dispatcher with the resulting Bearer token
          Dispatcher validates iss, aud, and tid claims - processes request

The client secret is entered once when the connection is created and stored encrypted as part of that connection. It is never sent to the Dispatcher directly - only the resulting Bearer token is.


Capabilities

All four REFRACT Platform actions in the Power Automate action picker
ActionDescriptionCommon Use
Generate DocumentRender a PDF from a template and data payload. Supports e-signature, approval workflows, watermarks, and feature flagsInvoice generation, contract creation, onboarding docs
Get Document URLStream the bytes of a stored document by blob path (a binary response, not a JSON URL)Attach to an email, save to SharePoint or OneDrive
Check Workflow StatusPoll the current state of a signature or approval workflowMonitor progress; drive Do Until loops
Download Sealed PDFStream the bytes of the final countersigned PDF once a workflow is completeArchive, email to customer, upload to SharePoint

Prerequisites

IT Admin Setup Required

Before a flow maker can create a connection, an IT admin must complete the Connector Setup & Configuration steps.

The flow maker needs five values from their IT admin to create a connection - there is no interactive sign-in step:

ValueExample
Dispatcher URLhttps://func-dispatcher-contoso-prod.azurewebsites.net
Azure AD Tenant IDc49962a1-53d3-4af8-8d5d-35f34cd0be9c
Client IDThe connector app registration's Application (client) ID
Client SecretThe connector app registration's client secret value
OAuth Scopeapi://<dispatcher-app-client-id>/.default

Quick Start

Create a Connection

In the left sidebar go to Data → Connections. Click + New connection.

Find the REFRACT Platform Connector

Search for REFRACT Platform. Select the connector from the results.

Enter the Connection Fields

Connect to REFRACT Platform dialog showing the Dispatcher URL, Tenant ID, Client ID, Client Secret and Scope fields
FieldWhat to enter
Dispatcher URLBase URL of the Dispatcher Function App - no /api suffix
Azure AD Tenant IDYour organization's tenant GUID
Client IDApplication (client) ID of the App Registration created for this connector
Client SecretThat App Registration's client secret value
OAuth Scopeapi://<dispatcher-app-client-id>/.default, where <dispatcher-app-client-id> is the client ID of "REFRACT Dispatcher API"

No trailing /api in Dispatcher URL

Enter https://func-dispatcher-contoso-prod.azurewebsites.net - not https://func-dispatcher-contoso-prod.azurewebsites.net/api. The /api prefix is handled automatically.

Create the Connection

Click Create. The connection is saved with these five values - there is no sign-in window and no connection test at creation time, since this connector does not define one. The first action call in a flow is what actually exercises the credentials; if they are wrong, that call fails with an authentication error (see Troubleshooting).


Common Flow Patterns

Generate an invoice PDF and email it to the customer.

Trigger: When a record is created (Dataverse  -  Sales Order)
Condition: Status = Approved

Action: Generate Document
  templatePath: "BC/Sales/SalesInvoice.rpkg"
  payloadPath:  "payloads/[Order Number].json"
  options: {
    "documentId": "[Order Number]",
    "docType": "invoice",
    "sourceSystem": "BusinessCentral",
    "generatedBy": "erp-service@contoso.com",
    "features": {
      "generatedDocuments": true,
      "auditSnapshot": true
    }
  }

Action: Send an email
  To:         [Customer Email]
  Subject:    Invoice [Order Number]
  Body:       Your invoice for order [Order Number] is attached.
  Attachment: body of Generate Document (the PDF binary returned directly by the action)

Generate Document returns the PDF binary directly, not a link - see API Reference for the response headers that carry the blob path, workflow ID, and correlation ID.

Generate a contract PDF and route it for electronic signature. Poll until the workflow reaches a terminal state, then archive the sealed document.

Trigger: When a record is created (Dataverse  -  Contract)

Action: Generate Document
  templatePath: "Legal/Contracts/ServiceAgreement.rpkg"
  payloadPath:  "payloads/contracts/[Contract ID].json"
  templateSettings: {
    "esign": {
      "enabled": true,
      "signers": [{ "slotIndex": 0, "role": "Signer", "email": "[Signer Email]", "namePrefill": "[Signer Name]" }],
      "expiresInMinutes": 10080
    }
  }
  options: {
    "documentId": "[Contract ID]",
    "docType": "contract",
    "features": {
      "generatedDocuments": true,
      "auditSnapshot": true,
      "vaultESign": true,
      "immutableAudit": true,
      "explainDocument": true
    }
  }

Action: Store Workflow ID in Dataverse record
  workflowId: [X-Refract-WorkflowId header from Generate Document]

Action: Do Until  state = "complete"  OR  state = "rejected"  OR  state = "cancelled"
  ├── Delay: 2 minutes
  └── Check Workflow Status
        Workflow ID: [Workflow ID]

Action: Condition  state = "complete"
  Yes → Download Sealed PDF (Workflow ID)
         Create file in SharePoint (body of Download Sealed PDF - the PDF binary)
  No  → Send rejection notification

Generate a purchase requisition and route it for management approval.

Trigger: When a record is created (Dataverse  -  Purchase Requisition)

Action: Generate Document
  templatePath: "Procurement/PurchaseRequisition.rpkg"
  payloadPath:  "payloads/requisitions/[Req ID].json"
  templateSettings: {
    "workflow": {
      "enabled": true,
      "recipients": [{ "email": "manager@contoso.com", "displayName": "Finance Manager" }],
      "message": "Please approve requisition [Req ID]",
      "expiresInDays": 1
    }
  }
  options: {
    "documentId": "[Req ID]",
    "docType": "workflow",
    "features": {
      "generatedDocuments": true,
      "auditSnapshot": true,
      "vaultESign": true,
      "immutableAudit": true
    }
  }

Action: Update record - store Workflow ID

Action: Do Until  state = "complete"  OR  state = "rejected"  OR  state = "cancelled"
  ├── Delay: 10 minutes
  └── Check Workflow Status (Workflow ID)

Action: Condition  state = "complete"
  Yes → Update record: Status = Approved
         Download Sealed PDF → attach to record
  No  → Update record: Status = Rejected
         Send notification to requestor

Poll on state, not a boolean flag

Check Workflow Status returns a state field with one of thirteen possible values (for example pending-approval, complete, rejected, cancelled). There is no isComplete or isRejected field in the response - build Do Until conditions against state instead. See the API Reference for the full list of states and recommended polling intervals.


Security Model

Every API call to the Dispatcher is validated against three JWT claims:

ClaimWhat it validates
audToken was issued for the Dispatcher's App Registration - rejects tokens for other apps
issToken was issued by your Microsoft Entra ID tenant - rejects tokens from foreign identity providers
tidToken belongs to the authorised tenant - prevents cross-tenant access

The connection stores the client secret encrypted; it is used only by the connector's own code to acquire a Bearer token from Azure AD for each request and is never forwarded to the Dispatcher itself. Acquired tokens are not visible in flow run history, logs, or action outputs.

Rate Limiting

To prevent runaway loops from overwhelming the Dispatcher:

  • Limit: 100 requests per 60 seconds per tenant/app combination
  • When exceeded: 429 Too Many Requests with a Retry-After header
  • Scope: In-memory per function instance

Next Steps


  • Trust Center - Security controls, compliance posture, and data handling - share with your security or procurement team
  • Privacy Policy - How data is processed and protected within your Azure tenant
  • Terms of Service - Legal terms governing use of REFRACT Platform

On this page