Vault Platform Connector for Power Platform

API Reference

Complete parameter definitions, response schemas, feature flags, and error codes for all four Vault Platform Power Platform connector actions.

Actions Overview

ActionMethodGateway Route
Generate DocumentPOST/api/gateway/v1/documents/generate
Get Document URLGET/api/gateway/v1/documents/open
Check Workflow StatusGET/api/gateway/v1/workflows/{workflowId}
Download Sealed PDFGET/api/gateway/v1/workflows/{workflowId}/pdf

Generate Document

Renders a PDF from a template and a JSON data payload stored in SharePoint. Returns a download URL and, when a workflow template is configured, a workflowId for tracking progress.

Request Parameters

ParameterRequiredTypeDescription
Template PathYesstringPath to the template in the template library (e.g. DynamicsGP/Workflows/vendor-onboarding.vpdf)
Payload PathYesstringSharePoint-relative path to the JSON data file (e.g. DynamicsGP/Workflows/vendor-onboarding-payload.json)
Template SettingsNoobjectControls e-signature, approval workflows, watermarks, and distribution. See Template Settings below.
OptionsNoobjectDocument metadata and feature flags. See Options below.

Options

The options object controls document identity, classification, and which Vault Platform features are activated for this render. All sub-fields are optional.

FieldTypeDescription
documentIdstringUnique document identifier - used as the PDF filename and written to SharePoint metadata (e.g. INV-2026-001)
docTypestringDocument category written to SharePoint columns (e.g. invoice, workflow, contract, report)
sourceSystemstringOriginating ERP or application (e.g. DynamicsGP, BusinessCentral, D365, Salesforce)
generatedBystringEmail or identity of the user or service principal that triggered generation
customColumnsobjectKey-value pairs (string values) written to custom SharePoint columns on the generated document item
featuresobjectBoolean feature flags. Any flag can be included - see Feature Flags.

documentId and docType live inside options

In Power Automate, set documentId and docType inside the Options field - not as top-level parameters. Top-level documentId and documentType fields do not exist in this connector.

Feature Flags

Pass any combination of boolean flags inside options.features. Unknown flags are forwarded to the Dispatcher and ignored if not supported.

FlagDescription
generatedDocumentsUpload the rendered PDF to the GeneratedDocuments library in SharePoint / Blob Storage
auditSnapshotWrite a PDFGenerated audit event to the AuditLogs library
dataRedactionApply field-level redaction policy defined in the template
explainDocumentCapture a machine-readable explanation trace of every render decision. Auto-enabled when vaultESign, dataRedaction, or section508Accessibility is active.
vaultESignTrigger electronic signature workflow after generation (requires templateSettings.esign or templateSettings.workflow)
immutableAuditWrite a tamper-evident audit record to the enterprise audit store
vaultDeliveryRoute the document through the Vault Delivery distribution service
section508AccessibilityApply PDF/UA-1 tagging and generate an accessibility compliance trace
vaultWorkflowEnable Vault workflow engine integration

Template Settings

Trigger an approval or review workflow after generation. Recipients receive an email with a link to review the document.

{
  "workflow": {
    "enabled": true,
    "recipients": [
      {
        "email": "[email protected]",
        "displayName": "Finance Manager"
      }
    ],
    "organizationName": "Contoso",
    "message": "Please review and approve this document.",
    "expiresInDays": 7,
    "requireOtp": false,
    "appendElectronicEvidence": true
  }
}
FieldTypeDescription
enabledbooleanMust be true to trigger the workflow
recipientsarrayList of { email, displayName } objects
organizationNamestringDisplayed in the workflow email
messagestringCustom message shown to recipients
expiresInDaysintegerDays before the workflow link expires
requireOtpbooleanRequire one-time passcode for recipient verification
appendElectronicEvidencebooleanAttach electronic evidence certificate to the sealed PDF

Route the document for electronic signature via the Vault eSign engine.

{
  "esign": {
    "enabled": true,
    "signingMode": "sequential",
    "expiresInDays": 14,
    "signers": [
      {
        "email": "[email protected]",
        "displayName": "Jane Smith",
        "role": "Signer",
        "slotIndex": 1
      }
    ],
    "message": "Please sign this agreement."
  }
}
FieldTypeDescription
enabledbooleanMust be true
signingModestring"sequential" (signers sign in order) or "parallel"
expiresInDaysintegerDays before signature link expires
signersarrayList of signer objects
messagestringMessage shown to each signer

Apply a text watermark to every page of the generated PDF.

{
  "watermark": {
    "enabled": true,
    "value": "CONFIDENTIAL",
    "opacity": 0.3
  }
}
FieldTypeDescription
enabledbooleanMust be true
valuestringWatermark text
opacitynumberOpacity from 0 (invisible) to 1 (opaque). Default: 0.3

Parameters in Power Automate

Generate Document action in Power Automate showing Template Path, Payload Path, Template Settings, Options Document ID, Options Document Type, Options Features and advanced parameters

Full Request Example

{
  "templatePath": "DynamicsGP/Workflows/vendor-onboarding.vpdf",
  "payloadPath": "DynamicsGP/Workflows/vendor-onboarding-payload.json",
  "templateSettings": {
    "workflow": {
      "enabled": true,
      "recipients": [{ "email": "[email protected]", "displayName": "Acme AP" }],
      "organizationName": "Contoso",
      "message": "Please complete vendor onboarding. Account: Vendor_106",
      "expiresInDays": 7,
      "requireOtp": false,
      "appendElectronicEvidence": true
    }
  },
  "options": {
    "documentId": "Vendor_107",
    "sourceSystem": "DynamicsGP",
    "docType": "workflow",
    "generatedBy": "[email protected]",
    "customColumns": { "vendorId": "Vendor1001", "vendorName": "Jane Smith" },
    "features": {
      "generatedDocuments": true,
      "auditSnapshot": true,
      "dataRedaction": true,
      "explainDocument": true,
      "vaultESign": true,
      "immutableAudit": true,
      "vaultDelivery": true
    }
  }
}

Response

Generate Document returns the PDF binary directly - not JSON. Metadata is in the response headers.

Generate Document successful run showing 200 status, x-vaultpdf-blobpath header, and PDF binary body
Response headerDescriptionExpression in Power Automate
x-vaultpdf-blobpathBlob path of the stored PDFoutputs('Generate_Document')?['headers']['x-vaultpdf-blobpath']
x-vaultpdf-workflowidWorkflow ID - only present when a workflow was startedoutputs('Generate_Document')?['headers']['x-vaultpdf-workflowid']
x-vaultpdf-correlationidUnique render ID for supportoutputs('Generate_Document')?['headers']['x-vaultpdf-correlationid']

The response body is the PDF binary ($content-type: application/pdf). You can pass it directly to Send an email (as attachment) or Create file (SharePoint/OneDrive) actions.

Getting the blob path and workflow ID in your flow

Blob path:   outputs('Generate_Document')?['headers']['x-vaultpdf-blobpath']
Workflow ID: outputs('Generate_Document')?['headers']['x-vaultpdf-workflowid']

Pass the blob path to Get Document URL to retrieve a fresh download link. Pass the workflow ID to Check Workflow Status to poll progress.

Error Responses

StatusDescriptionCommon Cause
400Invalid requesttemplatePath and payloadPath are both required; one is missing or malformed
401Authentication failedAzure AD token acquisition failed - check connection parameters
403Access deniedToken tid or aud does not match Dispatcher configuration
404Template or payload not foundFile does not exist at the specified SharePoint path
500Generation failedTemplate rendering error - use correlationId when contacting support

Get Document URL

Get Document URL successful run showing 200 status and JSON response body

Returns a short-lived (5 minute) signed download URL for a document stored in Blob Storage or SharePoint. Use the documentPath returned by Generate Document.

Parameters

ParameterRequiredTypeDescription
Blob PathYesstringContainer-qualified path returned by Generate Document (e.g. generated-documents/2026/06/file.pdf)

Response

{
  "url": "https://stcontoso.blob.core.windows.net/generated-documents/...?sv=..."
}
FieldTypeDescription
urlstringHTTPS signed download URL. Valid for 5 minutes - do not store long-term.

Link expiry

Download links expire after 5 minutes. Call Get Document URL again each time you need a fresh link. Do not store the URL - store the documentPath instead and generate links on demand.

Error Responses

StatusDescription
401Authentication failed
403blobPath container not in the allowed list
404Document not found at the specified path
500SAS URL generation failed (check Dispatcher storage configuration)

Check Workflow Status

Check Workflow Status successful run showing state: complete, currentStepIndex: 2, totalSteps: 3, title: Vendor Onboarding

Returns the current state of a document workflow. Poll this action until isComplete or isRejected is true, then call Download Sealed PDF.

Parameters

ParameterRequiredTypeDescription
Workflow IDYesstringThe workflowId returned by Generate Document

Response

{
  "workflowId": "a3f8c201-d4e9-47b2-91c3-556677880001",
  "state": "awaiting_signature",
  "isComplete": false,
  "isRejected": false,
  "currentStep": 1,
  "totalSteps": 2,
  "title": "Vendor Onboarding Workflow"
}
FieldTypeDescription
workflowIdstringThe workflow ID (as requested)
statestringCurrent state - see state values below
isCompletebooleantrue when all steps are done and the sealed PDF is available
isRejectedbooleantrue when a signer or approver rejected the document
currentStepIndexintegerIndex of the current step (1-based)
totalStepsintegerTotal number of steps in the workflow
titlestringDisplay name of the workflow template

Workflow States

StateMeaning
pendingWorkflow created, first email not yet sent
in_progressWorkflow active, awaiting recipient action
awaiting_signatureSpecifically waiting for one or more signatures
completeAll steps complete - sealed PDF is available
rejectedA recipient rejected the document - workflow is closed
ScenarioIntervalMax iterations
Administrative approval workflowsEvery 10 minutes144 (24 hours)
E-signature workflowsEvery 5 minutes288 (24 hours)
Time-critical signature requestsEvery 2 minutes180 (6 hours)

Do not poll too frequently

Excessive polling contributes toward the Dispatcher's rate limit of 100 requests per 60 seconds per tenant/app. Use delays appropriate to the workflow type.

Error Responses

StatusDescription
401Authentication failed
404Workflow ID not found or does not belong to this tenant
500Dispatcher error retrieving workflow state

Download Sealed PDF

Download Sealed PDF successful run showing 200 status with workflowId and format parameters

Returns a signed download URL for the completed, countersigned PDF. Only available once isComplete is true on Check Workflow Status.

Parameters

ParameterRequiredTypeDescription
Workflow IDYesstringThe workflowId returned by Generate Document

Response

{
  "downloadUrl": "https://stcontoso.blob.core.windows.net/vault-output/...?sv=..."
}
FieldTypeDescription
downloadUrlstringSigned download URL for the sealed PDF. Valid for 5 minutes.

What is a sealed PDF?

The sealed PDF includes the signed or approved document content, signature zones with signer identity and timestamps, and - when appendElectronicEvidence is enabled - an evidence certificate with a full audit trail and integrity hash.

Error Responses

StatusDescription
401Authentication failed
404Workflow not found, not complete, or sealed PDF not yet available
500SAS URL generation failed

Authentication Errors

These errors come from the connector script before the request reaches the Dispatcher.

Error messageCauseFix
Connection parameter 'tenantId' is missingPolicy template instances not appliedRedeploy the connector; verify 5 policyTemplateInstances in downloaded apiProperties.json
Connection parameter 'clientId' is missingSame as aboveSame fix
Azure AD rejected the token request (invalid_request): AADSTS90002...Tenant ID wrong or has whitespaceDelete and recreate the connection; enter the tenant GUID with no spaces
Invalid Client ID or Client SecretWrong clientId or clientSecretVerify in Azure Portal → App registrations → Certificates & secrets
App not authorised for client_credentialsApp Registration not configured for client credentialsCheck App Registration API permissions or contact Dispatcher administrator
Invalid OAuth ScopeScope format wrongUse exactly api://<dispatcher-app-client-id>/.default
Azure AD tenant not foundTenant GUID is wrongVerify tenant ID in Azure Portal → Azure Active Directory → Overview
Authentication timed outNetwork issue reaching login.microsoftonline.comConfirm outbound connectivity from Power Platform to Azure AD

Frequently Asked Questions

Connector & Connection

Yes. A connection created in a Power Platform environment is available to all flows and apps in that environment. You only need to create it once per environment.

Yes. Each connection stores its own Dispatcher URL and credentials. Create one connection per environment and point each to the corresponding Dispatcher instance.

Power Platform stores securestring connection parameters encrypted at rest. The value is never visible in flow run history, action outputs, or logs after the connection is created.

Generate Document

Yes. The features field accepts any boolean key - unknown flags are forwarded to the Dispatcher and activated if the Dispatcher version you are running supports them. You never need to update the connector to use new feature flags.

The connector runs a small C# script (script.csx) on every call - it acquires an Azure AD token and forwards the request to the Dispatcher. This script has a 5-second CPU execution limit, but that limit only covers the script's own code - time spent waiting for the Azure AD token response and the Dispatcher to generate the PDF does not count against it. The practical ceiling is the Power Automate flow step timeout of 120 seconds. Most document generations complete in 5–20 seconds depending on template complexity.

Both are returned in response headers, not the body. Read them with Power Automate expressions:

  • Blob path: outputs('Generate_Document')?['headers']['x-vaultpdf-blobpath']
  • Workflow ID: outputs('Generate_Document')?['headers']['x-vaultpdf-workflowid']
Workflows & Signatures

Workflow completion depends on recipient action (signing or approving). The workflow remains in_progress or awaiting_signature until all recipients act. Check the expiresInDays setting in your templateSettings - if the window elapses without action, isRejected may become true due to expiry.

isRejected becomes true and the workflow closes. No further signing or approval is possible on that document. A new document must be generated and a new workflow started.

Only after state is complete on Check Workflow Status. Calling it before that returns 404. Always check the workflow status in a Do Until loop before calling Download Sealed PDF.

On this page