Category Archives: Uncategorized
SharePoint Site with Env GUID Shared safely across PowerPlatform Lifecycle
Learn how to safely share one SharePoint site across the PowerPlatform lifecycle for ALM. By tagging SharePoint items and files with Environment GUID we can clearly identify the source Environment which created this item. MS Flow triggers with condition logic can “compare” the source SP data Environment GUID to the local current Environment GUID. If matched, proceed with action steps. If not matched, then cancel.
Allows us to streamline overall design, reduce components, while keeping safe isolated lifecycle for PowerPlatform Solutions, Canvas App, PowerAutomate MS Flow, and more.
- Central SharePoint site
- One URL only
- Share safely across PowerPlatform Lifecycle for ALM
- Multiple lifecycle (DEV \ TEST \ PROD)
- Tag SharePoint items with Environment GUID
- MS Flow cancels itself, if current Env not matching SPListItem Env

VIDEO
CODE – MS CANVAS APP ONSTART
// Auto detect current PowerPlatform Environment GUID
Set(varPPEnvironment, PPEnvironment.Run().ppenvironment);CODE – MS FLOW
workflow().tags.environmentNameSCREENSHOTS


REFERENCES
FREE DocuSign Alternative – PowerApps Canvas Digital Signature
How to collect Digital Signature with pen ink input which saves to SharePoint Document Library as transparent PNG. MS Flow handles submit with save to SPLIST and full audit trail.
- Step by step demo
- Signature to PNG
- SPList tracking

VIDEO
CODE
decodeDataUri(
replace(
triggerBody()['text_2'],
'"',
'')
)
REFERENCES
Email Tracing – Which MS Flow sent this? Easy HTML for support
Modify email HTML body in MS Flow with expression below for URL link directly to MS Flow run instance. Excellent method for long term support and debug. Thank you. Cheers.

USE CASES
- Who sent this email?
- Which MS Flow?
- Which Environment?
- How can we update email body or recipients?
- How can we view run history?
- How can we disable or enable?
VIDEO
CODE
<div style="color:#ffffff; font-size:5px">
concat('https://us.flow.microsoft.com/manage/environments/',workflow().tags.environmentName,'/flows/',workflow().name,'/runs/',workflow().run.name)
</div>
REFERENCES
Lookup Drive ID with REST API for SP Document Library and Word Online convert DOCX to PDF
Cheers
Step by step demo for how to loathe the “DriveID” for any given SharePoint document library. Demo includes
- Environment Variables
- API endpoint /_api/v2.1/drives
- Parse JSON
- Word Online for Business
- Convert any DOCX into PDF
- Display PDF output with any format (email attachment, SharePoint file, PowerApps button click, etc.)

VIDEO
REFERENCES
XML into Excel
Upload any static HTML to SharePoint Online
Step by step demo how to upload and static HTML resources to SharePoint Online. By default Microsoft will block this web display and force the HTML file to download locally. With a quick PowerShell setting change we can modify the default Site Collection setting and set DenyAddAndCustomizePages = $false, which now gives ability to display any HTML file which has been renamed to ASPX. Details below including PowerShell code. Cheers

CODE
$siteUrl = "https://spjeffdev.sharepoint.com/sites/Test/"
Connect-PnPOnline $siteUrl
Set-PnPTenantSite -Url $siteUrl -DenyAddAndCustomizePages:$falseVIDEO
SCREENSHOTS

REFERENCES
- NoExecute = 0 allows for web browser
- NoExecute = 1 blocks and forces download
- https://www.mrsharepoint.guru/host-static-website-on-sharepoint-online/
- https://learn.microsoft.com/en-us/sharepoint/allow-or-prevent-custom-script
- https://sharepoint.handsontek.net/2022/02/07/host-static-html-sites-modern-sharepoint-site-collections/
- https://stackoverflow.com/questions/71149864/how-to-host-static-html-page-on-sharepoint-online
- https://techcommunity.microsoft.com/t5/sharepoint/rendering-static-html-pages-from-sharepoint-online/m-p/394392

SPO Redirect all site traffic with PNP Banner META REFRESH.ps1
Want to redirect all site traffic in SharePoint Online? Not sure how? Check out this step-by-step video where we test 5 different URL redirect methods to find the best way of capturing all SharePoint Online site URL traffic and redirecting to any destination you want. Ideal for scenarios including:
- Site collection URL renames
- Company department rename and re-org.
- Tenant to tenant (T2) migration
- Classic to modern site migration
- And more
VIDEO
CODE
# Create Banner with PNP redirect
# SPJeff - SPO Redirect all site traffic with PNP Banner META REFRESH.ps1
# NOTE - Required SPPKG deployed from https://github.com/bschlintz/spfx-message-banner/tree/master
# Connect SPO
Import-Module "PnP.PowerShell"
$siteUrl = "https://spjeffdev.sharepoint.com/sites/demo"
Connect-PnPOnline -Url $siteUrl -UseWebLogin
Get-PnPWeb
# Banner JSON
$banner = @'
{
"message": "<meta http-equiv=\"refresh\" content=\"0;url=https://www.spjeff.com\" />",
"textColor": "#000000",
"backgroundColor": "#000000",
"textFontSizePx": 0,
"bannerHeightPx": 0,
"visibleStartDate": null,
"enableSetPreAllocatedTopHeight": false,
"disableSiteAdminUI": false
}
'@
# Register Custom Action
Add-PnPCustomAction -Title "SPFx Banner PNP" -Name "SPFx Banner PNP" -Scope "Site" -Location "ClientSideExtension.ApplicationCustomizer" -ClientSideComponentId "1e2688c4-99d8-4897-8871-a9c151ccfc87" -ClientSideComponentProperties $banner -Sequence "1000"
Get-PnPCustomAction -Scope "Site"- https://github.com/bschlintz/spfx-message-banner/tree/master
- https://spjsblog.com/modern-cewp/
- https://learn.microsoft.com/en-us/powershell/sharepoint/sharepoint-pnp/sharepoint-pnp-cmdlets
Cheers

Co Author PowerApps Canvas LIVE Multi User Editing
New preview feature from Microsoft allows multiple PowerApps Canvas authors to edit the same application in real-time. Matching experience with how SharePoint Online XLSX co-authoring for Excel works displaying current user and addition users presence indicator dot (avatar icon) we can see multiple developers editing the Canvas App simultaneously. Video demo below. Cheers.

VIDEO
REFERENCE
Backup all your MS PowerAutomate Flow with PowerShell for safety
Protect MS Flow investment with backups to both JSON and ZIP which include ALL MS Flow across ALL Environments.
Mitigate and reduce risks including:
- Reputation loss
- Financial loss
- Repeat development effort
- Lost research and development
Keep valuable systems online with fast recovery and restore. Simple PowerShell backup process covers everything with single PS1.
Cheers
VIDEO
GIT SOURCE CODE
https://github.com/spjeff/office365/blob/master/Backup-All-MS-Flow-JSON-and-ZIP.ps1
PowerPlatform – Display EVERYTHING (All Objects from All Solution)
How to leverage “Unmanaged – Default Solution” to display all objects across all solutions.
Easily and quicky locate any object for support (Without knowing which Solution hosts that object).
Support includes all object types:
- MS Flow
- Canvas App
- Model Driven App (MDA)
- Tables, columns, keys
- Security roles
- Dataflows
- Dialogs
- And more

REFERENCES

