PowerApps.co.nz

Power Apps, with Microsoft Power BI & Microsoft Power Automate

Power Apps Wrap Sign-In Error - redirect URI mismatch

This article discuses an error that can occur when signing in to a Power App that has been packaged using Wrap.

One of our clients needed a method to easily store the vaccination status of each of their employees. We did a search and found the good work of R Wilson on GitHub. We extended his sample app to patch each scanned vaccination pass to a SharePoint list.

It may not be a good idea to store these values for customers or non-employees, but the app does save a data entry job by automatically adding the details of the pass to a SharePoint list.






To set up the app follow these instructions.

Prerequisite
Make sure you have enabled PCF components for Canvas apps in your environment.

Import PCF Component Solution
• Download the app My-Vaccine-Pass-Scanner.zip
• Navigate to https://make.powerapps.com
• Click on Apps
• Click Import button on the ribbon and select the My-Vaccine-Pass-Scanner.zip file you downloaded.
• Follow the import wizard and wait for the app to import.


To set up the SharePoint list run the following PnP PowerShell scripts.

Install PnP PowerShell for SharePoint Online.

Run these scripts to install the list on a new SharePoint site collection.

write-host "Create Content Type"
$parent = Get-PnPContentType -Identity "Item"
Add-PnPContentType -Name "Covid Vax Content Type" -Description "Covid Vax Content Type for Covid Vax Tracker" -Group "_Covid Vax Content Types" -ParentContentType $parent

write-host "Create Additional Fields"
Connect-PnPOnline -Url https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.sharepoint.com/Sites/CovidVaxTracker -Interactive
Add-PnPFieldToContentType -Field "PersonID" -ContentType "Covid Vax Content Type"
Add-PnPField -DisplayName 'Given Name' -InternalName 'vaxGivenName' -Type 'Text' -Group '_Covid Vax Columns'
Add-PnPField -DisplayName 'Family Name' -InternalName 'vaxFamilyName' -Type 'Text' -Group '_Covid Vax Columns'
Add-PnPFieldFromXml ''
Add-PnPField -DisplayName 'Vax Status' -InternalName 'vaxVaxStatus' -Type 'Choice' -Group '_Covid Vax Columns' -Choices "Checked","Single","Double","Booster"

write-host "Add Fields to Content type"
Add-PnPFieldToContentType -Field "Given Name" -ContentType "Covid Vax Content Type"
Add-PnPFieldToContentType -Field "Family Name" -ContentType "Covid Vax Content Type"
Add-PnPFieldToContentType -Field "DoB" -ContentType "Covid Vax Content Type"
Add-PnPFieldToContentType -Field "Vax Status" -ContentType "Covid Vax Content Type"
Add-PnPField -DisplayName 'PersonID' -InternalName 'vaxPersonID' -Type 'User' -Group '_Covid Vax Columns'

write-host "Create Lists and Libraries"
New-PnPList -Title "Covid Vax Status" -Url "CovidVaxStatus" -Template GenericList -EnableContentTypes
Remove-PnPContentTypeFromList -List "Covid Vax Status" -ContentType "Item"
Add-PnPContentTypeToList -List "Covid Vax Status" -ContentType "Covid Vax Content Type" -DefaultContentType
Add-PnPNavigationNode -Title "Covid Vax Status" -Url "/sites/CovidVaxTracker/CovidVaxStatus" -Location "QuickLaunch"

write-host "New List Created: Covid Vax Status"

Add your SharePoint site as a data connection in the PowerApp to point to your site collection.

When you open the app you will be prompted with the following message relating to the
NZCovid Pass Component.
Page 1 of 4