Enabling low code developers to
Create custom client reports with a helping hand from Azure
Introduction
- Share an Architecture pattern today
- In this example:
- Use Power Automate to generate a custom report
- Based on Dataverse data
- Share it with our client securely via a link
Ian Tweedie
- Power Platform Technical Consultant, Capgemini
- Trustee for Digital Transformation for a £22 million non for profit
- Chair of an £750k non for profit
- Calculate working day
- Email domain checker
- Dataverse 4 Teams Local ALM Tool
- Around 1/2 a million hits a month

Community Content
Problem
WE ARE handling high value claims
WE NEED TO share settlement documents with our clients
WE MUST share these documents securely
Problems
Slow
Inaccessible
Clunky
Internal User Driven
Key component
Web Page
- Flow with HTTP Request trigger
- Response Headers
content-type : text/html
content-type : text/html
Lets see that working
Demo 4
Key component
@{triggerOutputs()[‘queries’]}
@{triggerOutputs()['queries']}
Overview
graph LR
A(User) --> B(Flow) --> C(Dataverse)
Sequence
sequenceDiagram
autonumber
actor User
User->>Flow: Clicks link HTTP
Flow->>Dataverse: Requests data
Dataverse-->>Flow: Data returned
Flow->>SharePoint: Requests template
SharePoint-->>Flow: Template returned
Flow-->Flow: Merge data in to template
Flow-->>User: Returns PDF
What do we need?
sequenceDiagram
autonumber
actor User
User->>Flow: Clicks link
Flow-->>User: Returns PDF
Reverse Proxy
sequenceDiagram
autonumber
actor User
User->>Reverse-Proxy: Clicks link
Reverse-Proxy-->>Reverse-Proxy: Authentication
Reverse-Proxy->Flow: Forwards Request
Flow-->>Reverse-Proxy: Returns PDF
Reverse-Proxy-->>User: Returns PDF
Where can I find this
Out of the box Authentication
Azure function
- Forwards all headers received from the incoming request.
- Adds custom header Flow-Key (from environment variables).
- Handles GET, POST, OPTIONS method.
- Appends query parameters from the incoming request to the external URL.
FLOW_URL=https://prod-21.uksouth.logic.azure.com/workflows/your-logic-app-url
FLOW_KEY=your-flow-key-value
Lets deploy it
- Access the Repo
- Press Deploy
- Follow the on screen instructions
Lets deploy it
- Access the Repo
- Press Deploy
- Follow the on screen instructions
- Add Environment variables
FLOW_URL=https://prod-15.uksouth.logic.azure.com/workflows/7a854d30969e4158bac2b17ac15d1ad7/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=FrLhWsuldO9AiPgF4ztcjuvjsSrBrJtlD5Mf17jjU_I
FLOW_KEY=ABC123
Lets deploy it
- Access the Repo
- Press Deploy
- Follow the on screen instructions
- Add Environment variables
- Setup Azure B2C
Lets see that working
Demo 5
Try it out
Username:
demo@tweed.technology
Password:
TechTweedie1!
Key component
X-MS-CLIENT-PRINCIPAL-ID
"X-MS-CLIENT-PRINCIPAL-ID": "1ebcd192-5366-48eb-9028-04610ae1704d"
Key component
Fetch XML
<fetch>
<entity name="techtwed_settlement">
<attribute name="techtwed_name" />
<attribute name="techtwed_settlementid" />
<filter>
<condition attribute="techtwed_name" operator="eq" value="SET-1001-T8B5" />
</filter>
<link-entity name="contact" from="contactid" to="techtwed_customer" alias="contact">
<link-entity name="adx_externalidentity" from="adx_contactid" to="contactid" alias="externalid">
<filter>
<condition attribute="adx_username" operator="eq" value="1ebcd192-5366-48eb-9028-04610ae1704d" />
</filter>
</link-entity>
</link-entity>
</entity>
</fetch>
High Level Solution

Sequence Diagram
sequenceDiagram
autonumber
actor User
User->>Reverse-Proxy: Click Link
Reverse-Proxy->>Reverse-Proxy: Authentication
Reverse-Proxy->>Flow: Forwards request
Flow->>Dataverse: Requests data
Dataverse-->>Flow: Data returned
Flow->>SharePoint: Requests template
SharePoint-->>Flow: Template returned
Flow-->Flow: Merge data in to template
Flow->>Reverse-Proxy: Returns PDF
Reverse-Proxy->>User: Returns PDF
Where have I used this Pattern
- Document Generation
- WiFi Network Login
- Register Interest
- Login to a legacy systems
- Door code generation