
Dit project heeft als doel om alle facetten van Power Portal Platforms ingeregeld te krijgen. Daarvoor is het volgende verlanglijstje als vertrekpunt genomen.
Deze punten worden in dit artikel beschreven in de volgende hoofdstukken.
Het vertrekpunt is een betaald Microsoft Business Standard en een door Microsoft gratis beschikbaar gesteld Renewable E5. Voor beiden geldt, dat er beperkingen gelden in welke environments gemaakt kunnen worden. Voor een test omgeving voldoet een trial. Die vervalt elke 30 dagen, maar het hele idee is toch dat het uitrollen van de portal naar verschillende omgevingen zo eenvoudig mogelijk moet zijn, dus dat is geen bezwaar. De default omgevingen zijn bedoeld als een soort gemeenschappelijke speeltuin, dus die optie is niet zo geschikt. Daarom is de development omgeving op mijn Business Standard tenant ingezet voor de live portal, en vind ontwikkeling plaats op de development omgeving van de Microsoft 365-E5 tenant.
- Developer omgeving dts2021 tenant admin's Environment wordt automatisch neergezet.
- admin.powerplatform.microsoft.com > dts2021 tenant admin's Environment > Edit
- URL: dts2021-dev> Save
- Settings
- Product > Languages > Enable Dutch > Apply > OK
Tijdens het wachten, maak alvast de SharePoint Documentopslag locatie (https://teams.microsoft.com )
- Join or create a team > Create a Team > From Scratch > Private > dts2021-dev-portal > Create > Skip
- Email > Mailboxes > Select the mail box of the admin > Approve email > Test & Enable Mailbox
Let hier op dat binnen een tenant slechts één organisatie (lees omgeving) aan een mailbox kan worden gekoppeld. Wanneer er meerdere omgevingen zijn ingericht, dan heb je dus meerdere mailboxen nodig.- make.powerapps.com > dts2021 tenant admin's Environment > Dataverse > Tables > Business Unit > Data > Edit in Excel
- Wijzig de naam in dts2021-dev > Publish
- admin.powerplatform.microsoft.com > dts2021 tenant admin's Environment > Settings > Integration > Document management settings
- Enable Server-Based SharePoint Integration > Next > Next > https://dts2021.sharepoint.com/sites/desktopservicesportal/ > Next > Finish
- make.powerapps.com > dts2021 tenant admin's Environment > New App > Portal
- Name: Desktop Services Power Apps Portal, address: dts2021-dev > Create
- portal.azure.com > App registrations > Power Apps DevOps Enterprise App (create or reuse)
- leg application ID 511a5141-ae68-4913-989a-da28606d06bc en tenant ID 6a81ac0b-1932-495a-b1bb-730db81ddc67 vast. Registreer een client secret en bewaar deze in KeePass.
- admin.powerplatform.microsoft.com > dts2021 tenant admin's Environment > Users > app users list > Add an app
- Power Apps DevOps Enterprise App > Add > Business Unit: dts2021-dev, Security Role: system administrator > Create
- admin.powerplatform.microsoft.com > dts2021 tenant admin's Environment > Portals > Desktop Services Power Apps Portal > Manage > Set up SharePoint integration
- Enable > Accept permissions
Naast de Portal Configuratie data bevat het portaal webformulieren op Dataverse tabellen. Om die tussen omgevingen over te kunnen zetten, is een Solution nodig. Hierin worden ook andere onderdelen meegenomen, zoals een werkstroom om artikelteksten te vertalen. Het aanmaken van de solution gaat als volgt.
- make.powerapps.com > dts2021 tenant admin's Environment > Solutions > New Solution
- Display name: Desktop Services Portal, Name: dtsportal > New publisher > Display Name: Desktop Services, Name: desktopservices, prefix: dts > Save > Create
De stappen om de test- en liveomgevingen gereed te maken om er de ontwikkelportal te laten landen, zijn als volgt. Er zit aardig wat wachttijd, dus houd rekening met een paar uur. Aan de andere kant, deze omgevingen worden pas gevoed zodra de DevOps pipelines zijn ingeregeld, dus deze handelingen kunnen tijdens het ontwikkeltraject worden doorlopen.
- Live omgeving: developer omgeving wordt automatisch neergezet. Wacht tot de 2021 release wave 2 update actief wordt.
- admin.powerplatform.microsoft.com > Marc Boes (DTS)'s Environment > Edit
- URL: dts-marcboes > Save
- Settings
- Product > Languages > Enable Dutch > Apply > OK
Tijdens het wachten, maak alvast de SharePoint Documentopslag locatie (https://teams.microsoft.com )- Join or create a team > Create a Team > From Scratch > Private > desktopservicesportal > Create > Skip
- Enable the PowerApps for the team, as this is useful for (otherwise premium) Power Automate Flows. In this solution this will be used to transfer files from the SharePoint Library to the Azure Storage Account used for Portal assets.
- Email > Mailboxes > Select the mail box of the admin > Approve email > Test & Enable Mailbox
Let hier op dat binnen een tenant slechts één organisatie (lees omgeving) aan een mailbox kan worden gekoppeld. Wanneer er meerdere omgevingen zijn ingericht, dan heb je dus meerdere mailboxen nodig.- make.powerapps.com > Marc Boes (DTS)'s Environment > Dataverse > Tables > Business Unit > Data > Edit in Excel
- Wijzig de naam naar Desktop Services > Publish
- admin.powerplatform.microsoft.com > Marc Boes (DTS)'s Environment > Settings > Integration > Document management settings
- Enable Server-Based SharePoint Integration > Next > Next > https://desktopservices.sharepoint.com/sites/desktopservicesportal > Next > Finish
- make.powerapps.com > Marc Boes (DTS)'s Environment > New App > Portal
- Name: temp, address: 2021122021 > Create
Maak een Blank Portal app om de portal pakketjes te installeren.- Portal Management > Websites > temp > Delete > Delete
- Apps > temp > Delete > Delete
- portal.azure.com > App registrations > Power Apps DevOps Enterprise App (create or reuse)
- bewaar de client ID: 07b75880-00bc-4238-8241-0ff7a2545ef2, tenant ID 43de655e-999a-419a-bebb-37b748c36c0c en client secret: KeePass.
- admin.powerplatform.microsoft.com > Marc Boes (DTS)'s Environment > Users > app users list > Add an app
- Power Apps DevOps Enterprise App > Add > Business Unit: Desktop Services, Security Role: system administrator > Create
- Test omgeving: aanmaken met een Dynamics 365 free trial (https://dynamics.microsoft.com/en-us/dynamics-365-free-trial/ )
- admin.powerplatform.microsoft.com > Field Service Trial > Edit
- leg de URL vast: https://org6aa8e06c.crm4.dynamics.com/
- Settings
- Product > Languages > Enable Dutch > Apply > OK
- Tijdens het wachten, maak alvast de SharePoint Documentopslag locatie (https://teams.microsoft.com )
- Join or create a team > Create a Team > From Scratch > Private > desktopservicesportal-t > Create > Skip
- Email > Mailboxes > Select the mail box of the admin > Approve email > Test & Enable Mailbox
Let hier op dat binnen een tenant slechts één organisatie (lees omgeving) aan een mailbox kan worden gekoppeld. Wanneer er meerdere omgevingen zijn ingericht, dan heb je dus meerdere mailboxen nodig.- admin.powerplatform.microsoft.com > Marc Boes (DTS)'s Environment > Settings > Integration > Document management settings
- Enable Server-Based SharePoint Integration > Next > Next > https://dts2021.sharepoint.com/sites/desktopservicesportal-t/ > Next > Finish
- portal.azure.com > App registrations > Power Apps DevOps Enterprise App (create or reuse)
- store the application and object id: 511a5141-ae68-4913-989a-da28606d06bc, 09d436e4-05a6-4395-97bd-0afca43dce36
- admin.powerplatform.microsoft.com > Field Service Trial > Users > app users list > Add an app
- Power Apps DevOps Enterprise App > Add > Business Unit: org6aa8e06c, Security Role: system administrator > Create
De Power Apps Solution is het vehikel om componenten zoals processen, tabellen en Apps te kunnen distribueren. De Portaal solution bevat in eerste instantie een App om artikelen te beheren, email processen en een werkstroom om artikelteksten te vertalen. Voor het beheer van artikelen is een eenvoudige App in de solution opgenomen. Elk artikel heeft een aantal hoofdstukken en elk hoofdstuk heeft een categorie. Door deze gegevens te combineren in het portaal is het eenvoudig om deze met iconen en kleuren op te maken en een inhoudsopgave kan ook zo gemakkelijk worden gegenereerd. Een artikel heeft ook een 'vertaal' lookup kolom. Een Power Automate Flow wordt getriggered op dit veld en daarmee wordt de tekst uit een ander artikel uitgelezen, vertaald en in het body veld opgenomen.
Entity: DTS Article, Schema Name: dts_article
| Schema Name | Display Name | Attribute Type | Description |
|---|---|---|---|
| dts_articlecolour | Article Colour | String | |
| dts_articledate | Article Date | DateTime | |
| dts_articleId | DTS Article | Uniqueidentifier | Unique identifier for entity instances |
| dts_articleimageurl | Article Image URL | String | |
| dts_articlereferences | Article References | Memo | Links to (external) source materials |
| dts_articletitle | Article Title | String | Caption used in Cards |
| dts_iconname | Icon Name | String | Name in an icon font, like one from the Office UI Fabric |
| dts_Name | Article Code | String | Required format: partial url_language code. For example 2021-03_en-US |
| dts_Summary | Summary | Memo |
Entity: DTS Article Category, Schema Name: dts_articlecategory
| Schema Name | Display Name | Attribute Type | Description |
|---|---|---|---|
| dts_articlecolour | Article Colour | String | |
| dts_articledate | Article Date | DateTime | |
| dts_articleId | DTS Article | Uniqueidentifier | Unique identifier for entity instances |
Entity: DTS Article Chapter, Schema Name: dts_articlechapter
| Schema Name | Display Name | Attribute Type | Description |
|---|---|---|---|
| dts_article | Article | Lookup | |
| dts_articlechapterId | DTS Article Chapter | Uniqueidentifier | Unique identifier for entity instances |
| dts_articleName | N/A | String | N/A |
| dts_category | Category | Lookup | |
| dts_categoryName | N/A | String | N/A |
| dts_chapternumber | Chapter Number | Integer | |
| dts_chapterreferences | Chapter References | Memo | |
| dts_chaptertitle | Chapter Title | String | |
| dts_Copy | Copy | Memo | Shows the content of the article chapter. |
| dts_fabricmdl2icon | FabricMDL2Icon | String | FabricMDL2Icon unicode |
| dts_Name | Chapter Code | String | Required for data flow updates. Must be unique, so a chapter title won't work. |
| dts_summary | Summary | String | |
| dts_TranslationFrom | Translation From | Lookup | Selecting a source article triggers a flow to copy the references and retrieve a translation of the Copy field from another article. |
| dts_TranslationFromName | N/A | String | N/A |
| ##Cloud Flows | |||
| Translate Article Chapter is een Cloud Flow om een artikelvertaling in te lezen. | |||
| <iframe src="https://stpowerappsportals.blob.core.windows.net/assets/blogs/FlowHTML/DTS%20Portal%20-%20Translate%20Article%20Chapter.html" width="100%" height="480" style="border:none;"> | |||
| </iframe> |
##Processes Tot slot zijn twee out-of-the-box processen opgenomen, omdat daar het verzend emailadres in moet worden gezet.
- Send Email Confirmation To Contact
- Send Password Reset To Contact
- [ ] make.powerapps.com > dts2021 tenant admin's Environment > Solutions > Desktop Service Portal
- [ ] Add Existing > Automation > Process > Send Email Confirmation To Contact
- [ ] Wijzig "Create New Message " Properties 'From'
- [ ] Save and Close > Activate > Activate
- [ ] Send Password Reset To Contact > Set "Create New Message " Properties
- [ ] Wijzig "Create New Message " Properties 'From'
- [ ] Save and Close > Activate > Activate
The styling of the Desktop Services portal has been done with a custom theme and a custom stylesheet.
Some notes will follow, but it is quite straightforward. The easiest is to create dev / acc / prd themes, but switching them in the pipeline is not successful so far.
One gotcha: create a copy of the Header Web Template as it contains hard references to the hero and messes up the search page.
One special thing, is the PVA. This is done with info from the post Add floating Chat Bot (Microsoft Virtual Agent) on Power Portal (PowerApps)
Creating a nice chatbot in Power Virtual Agents will sometimes be described here. At the moment, an earlier - and hardly related - PVA has been placed on the portal with the actions described in the reference link. The design is not great at the moment and as soon as it is improved, that will also be described here.
Aangezien er op de test- en live omgeving zo weinig mogelijk configuratie plaatvindt, is voor het testen van deze omgevingen het nodig om de development omgeving uit te rollen. Hiervoor zijn drie pipelines ingeregeld. Het portaal bevat zowel statische pagina's als pagina's die gebruik maken van Dataverse tabellen. Er is daarom zowel een solution als een portal configuratie die overgezet wordt. De records in deze tabellen worden niet in deze pipelines overgezet.
Na de eerste release, zijn er een aantal eenmalige handelingen om de autorisaties in te regelen en om de web site app aan te maken.
- DevOps Deploy DEV to PRD
- Apps > New App > Portal
- Name: Desktop Services Portal, Address: desktopservices, Language: English, check Use data from existing website record, Start with data from this website record: Desktop Services Portal > Create
- admin.powerplatform.microsoft.com > Marc Boes (DTS)'s Environment > Portals > Desktop Services Portal > Manage > Portal Actions
- Update Dynamics 365 URL
Omdat de URL van de Environment is aangepast in de eerste stap, is deze stap nodig om de Portal App goed te laten werken.- Dataverse > Dataflows
- New dataflow > Name: Import DEV Dataverse Article Tables > Dataverse > Environment domain: dts2021-dev.crm4.dynamics.com , Connection name: Development > Sign in > Next > dts_article, dts_articlecategory, dts_articlechapter > Next > Next > Load to existing table, automap (3x), map sleutelvelden bij articlechapters > Publish
- New dataflow > Name: Import DEV Dataverse Whisky Tables > Dataverse > Environment domain: dts2021-dev.crm4.dynamics.com , Connection name: Development > Sign in > Next > dts_whiskybase > Next > Next > Load to existing table, automap > Publish
Let op: de artikel tabellen zijn voorzien van keys op de 1-kant van de 1:n relaties tussen artikel en artikelhoofdstukken en tussen artikelcategorie en artikelhoofdstuk. Zonder die Keys in te stellen, biedt dataflow geen ondersteuning voor de import van de sleutelvelden bij de artikelen.
- Autorisatiehandelingen
- Log on (AAD) met admin account om Microsoft CRM Portal rechten toe te kennen. Tot dat moment werkt de Portal App Maker niet.
- DevOps Deploy DEV to ACC
- Apps > New App > Portal
- Name: Desktop Services (TEST), Address: desktopservices-t, Language: English, check Use data from existing website record, Start with data from this website record: Desktop Services Portal (ACC) > Create
- admin.powerplatform.microsoft.com > Field Services Trial > Portals > Desktop Services Portal > Manage > Portal Actions
- Update Dynamics 365 URL
Omdat de URL van de Environment is aangepast in de eerste stap, is deze stap nodig om de Portal App goed te laten werken.- Dataverse > Dataflows
- New dataflow > Name: Import DEV Dataverse Article Tables > Dataverse > Environment domain: dts2021-dev.crm4.dynamics.com , Connection name: Development > Sign in > Next > dts_article, dts_articlecategory, dts_articlechapter > Next > Next > Load to existing table, automap (3x), map sleutelvelden bij articlechapters > Publish
- New dataflow > Name: Import DEV Dataverse Whisky Tables > Dataverse > Environment domain: dts2021-dev.crm4.dynamics.com , Connection name: Development > Sign in > Next > dts_whiskybase > Next > Next > Load to existing table, automap > Publish
Let op: de artikel tabellen zijn voorzien van keys op de 1-kant van de 1:n relaties tussen artikel en artikelhoofdstukken en tussen artikelcategorie en artikelhoofdstuk. Zonder die Keys in te stellen, biedt dataflow geen ondersteuning voor de import van de sleutelvelden bij de artikelen.
- Autorisatiehandelingen
- Log on (AAD) met admin account om Microsoft CRM Portal rechten toe te kennen. Tot dat moment werkt de Portal App Maker niet.
Het project is opgesplitst in vier features:
name: Deploy Development_$(Date:yyyyMMdd)$(Rev:.r)trigger: nonestages: - stage: Build displayName: 'Build artifacts' variables: - group: 'DTSPortal-DEV' - group: 'DTSPortal-Secrets' jobs: - job: BuildDTSPortal pool: vmImage: 'windows-latest' steps: - task: PowerShell@2 displayName: 'Resolve old pac installation' inputs: targetType: 'inline' script: | # Delete previous install if any to prevent conflicts old / more than one version Remove-Item -literalpath pac -recurse -ErrorAction SilentlyContinue - task: NuGetToolInstaller@1 displayName: 'Use NuGet ' - task: NuGetCommand@2 displayName: 'Install pac' inputs: command: custom arguments: 'install Microsoft.PowerApps.CLI -OutputDirectory pac' - task: PowerShell@2 displayName: 'Find pac folder' inputs: targetType: 'inline' script: | $pacNugetFolder = Get-ChildItem "pac" | Where-Object {$_.Name -match "Microsoft.PowerApps.CLI."} $pacPath = $pacNugetFolder.FullName + "\tools" echo "##vso[task.setvariable variable=pacPath]$pacPath" - task: PowerShell@2 displayName: 'Download Development Configuration' inputs: targetType: 'inline' script: | # DEVELOPMENT CONFIGURATION TO DEVELOPMENT BRANCH $env:PATH = $env:PATH + ";" + "$(pacPath)" git config user.email "marcboes@hotmail.com" git config user.name "from Pipeline" git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" checkout Development pac auth create -u $(environmentURL) -id $(devops-clientID) -cs $(DTS2021DevOpsSecret) -t $(devops-tenantID) pac paportal download --path $(Build.SourcesDirectory)\source\portals -id $(websiteID) --overwrite true git add --all git commit -m 'Build release assets $(Build.BuildID)' git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin Development # BUILD ACC RELEASE BRANCH git branch 'Release/acc-$(Build.BuildID)' git checkout 'Release/acc-$(Build.BuildID)' Copy-Item -path .\source\portals\desktop-services-portal\deployment-profiles\acc.portalbasictheme.css .\source\portals\desktop-services-portal\web-files\portalbasictheme.css git add .\source\portals\desktop-services-portal\web-files\portalbasictheme.css git commit -m 'Build release assets ACC $(Build.BuildID)' git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin 'Release/acc-$(Build.BuildID)' # BUILD PRD RELEASE BRANCH git branch 'Release/prd-$(Build.BuildID)' git checkout 'Release/prd-$(Build.BuildID)' Copy-Item -path .\source\portals\desktop-services-portal\deployment-profiles\prd.portalbasictheme.css .\source\portals\desktop-services-portal\web-files\portalbasictheme.css git add .\source\portals\desktop-services-portal\web-files\portalbasictheme.css git commit -m 'Build release assets PRD $(Build.BuildID)' git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin 'Release/prd-$(Build.BuildID)' # ACTIVATE ACC RELEASE BRANCH git checkout 'Release/acc-$(Build.BuildID)' - task: PublishBuildArtifacts@1 displayName: 'Build ACC Artifacts' inputs: PathtoPublish: 'source/' ArtifactName: 'ACC' publishLocation: 'Container' - task: PowerShell@2 displayName: 'ACTIVATE PRD RELEASE BRANCH' inputs: targetType: 'inline' script: | # Activate PRD to create artifact git checkout 'Release/prd-$(Build.BuildID)' - task: PublishBuildArtifacts@1 displayName: 'Build PRD Artifacts' inputs: PathtoPublish: 'source/' ArtifactName: 'PRD' publishLocation: 'Container' - stage: DeployACC displayName: 'Deploy to Acceptance environment' variables: - group: 'DTSPortal-ACC' - group: 'DTSPortal-Secrets' jobs: - deployment: pool: vmImage: 'windows-latest' environment: 'ACC' strategy: runOnce: deploy: steps: - task: NuGetCommand@2 inputs: command: 'custom' arguments: 'install Microsoft.PowerApps.CLI -OutputDirectory pac' - task: PowerShell@2 displayName: 'Upload Portal Data ACC' inputs: targetType: 'inline' script: | # Find pac folder $pacNugetFolder = Get-ChildItem "pac" | Where-Object {$_.Name -match "Microsoft.PowerApps.CLI."} $pacPath = $pacNugetFolder.FullName + "\tools" echo "##vso[task.setvariable variable=pacPath]$pacPath" # Upload Portal Configuration $(environmentURL) $env:PATH = $env:PATH + ";" + "$pacPath" pac auth create -u $(environmentURL) -id $(devops-clientID) -cs $(DTS2021DevOpsSecret) -t $(devops-tenantID) pac paportal upload --path "$(Pipeline.Workspace)/ACC/portals/desktop-services-portal" --deploymentProfile acc - stage: DeployPRD displayName: 'Deploy to Production environment' variables: - group: 'DTSPortal-PRD' - group: 'DTSPortal-Secrets' jobs: - deployment: pool: vmImage: 'windows-latest' environment: 'PRD' strategy: runOnce: deploy: steps: - task: NuGetCommand@2 inputs: command: 'custom' arguments: 'install Microsoft.PowerApps.CLI -OutputDirectory pac' - task: PowerShell@2 displayName: 'Upload Portal Data PRD' inputs: targetType: 'inline' script: | # Find pac folder $pacNugetFolder = Get-ChildItem "pac" | Where-Object {$_.Name -match "Microsoft.PowerApps.CLI."} $pacPath = $pacNugetFolder.FullName + "\tools" echo "##vso[task.setvariable variable=pacPath]$pacPath" # Upload Portal Configuration $(environmentURL) $env:PATH = $env:PATH + ";" + "$pacPath" pac auth create -u $(environmentURL) -id $(devops-clientID) -cs $(DesktopServicesDevOpsSecret) -t $(devops-tenantID) pac paportal upload --path "$(Pipeline.Workspace)/PRD/portals/desktop-services-portal" --deploymentProfile prd - stage: Cleanup displayName: 'Cleanup ACC and PRD branch' variables: - group: 'DTSPortal-Secrets' jobs: - job: Cleanup pool: vmImage: 'windows-latest' steps: - task: PowerShell@2 displayName: 'Merge Development' inputs: targetType: 'inline' script: | git config user.email "marcboes@hotmail.com" git config user.name "from Pipeline" git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" checkout main git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" pull git merge 'origin/Development' git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push - task: DownloadPipelineArtifact@2 displayName: 'Download ACC artifact' inputs: buildType: 'current' artifactName: 'ACC' targetPath: './ACC' - task: DownloadPipelineArtifact@2 displayName: 'Download PRD artifact' inputs: buildType: 'current' artifactName: 'PRD' targetPath: './PRD' - task: PowerShell@2 displayName: 'Add ACC and PRD artifacts' inputs: targetType: 'inline' script: | git config user.email "marcboes@hotmail.com" git config user.name "from Pipeline" git add --all git commit -m 'Store build $(Build.BuildID)' git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push # try to cleanup the branches git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin --delete 'Release/acc-$(Build.BuildID)' git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin --delete 'Release/prd-$(Build.BuildID)'name: Deploy Solution Portal_$(Date:yyyyMMdd)$(Rev:.r)trigger: nonestages: - stage: Build displayName: 'Build artifacts' variables: - group: 'DTSPortal-DEV' - group: 'DTSPortal-Secrets' jobs: - job: BuildDTSPortal pool: vmImage: 'windows-latest' steps: - task: PowerPlatformToolInstaller@0 inputs: DefaultVersion: true - task: PowerShell@2 displayName: 'Checkout Development branch' inputs: targetType: 'inline' script: | # DEVELOPMENT BRANCH git config user.email "marcboes@hotmail.com" git config user.name "from Pipeline" git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" checkout Development - task: PowerPlatformSetSolutionVersion@0 inputs: authenticationType: 'PowerPlatformSPN' PowerPlatformSPN: 'Development Environment Desktop Services' SolutionName: 'dtsportal' SolutionVersionNumber: '1.0.0.$(Build.BuildId)' - task: PowerPlatformExportSolution@0 displayName: 'Export unmanaged solution' inputs: authenticationType: 'PowerPlatformSPN' PowerPlatformSPN: 'Development Environment Desktop Services' SolutionName: 'dtsportal' SolutionOutputFile: '$(Build.SourcesDirectory)\source\solutions\dtsportal-unmanaged.zip' AsyncOperation: true MaxAsyncWaitTime: '60' - task: PowerPlatformUnpackSolution@0 displayName: 'Unpack unmanaged solution' inputs: SolutionInputFile: '$(Build.SourcesDirectory)\source\solutions\dtsportal-unmanaged.zip' SolutionTargetFolder: '$(Build.SourcesDirectory)\source\solutions\dtsportal-unmanaged' OverwriteFiles: true SolutionType: Unmanaged - task: PowerPlatformExportSolution@0 displayName: 'Export managed solution' inputs: authenticationType: 'PowerPlatformSPN' PowerPlatformSPN: 'Development Environment Desktop Services' SolutionName: 'dtsportal' SolutionOutputFile: '$(Build.SourcesDirectory)\source\solutions\dtsportal-managed.zip' Managed: true AsyncOperation: true MaxAsyncWaitTime: '60' - task: PowerPlatformUnpackSolution@0 displayName: 'Unpack managed solution' inputs: SolutionInputFile: '$(Build.SourcesDirectory)\source\solutions\dtsportal-managed.zip' SolutionTargetFolder: '$(Build.SourcesDirectory)\source\solutions\dtsportal-managed' SolutionType: 'Managed' - task: PowerShell@2 displayName: 'Commit Portal Solution' inputs: targetType: 'inline' script: | git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" add --all git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" commit -m 'Build Portal Solution $(Build.BuildID)' git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin Development - task: PublishBuildArtifacts@1 inputs: PathtoPublish: 'source\solutions\dtsportal-managed.zip' ArtifactName: solution publishLocation: 'Container' - stage: DeployACC displayName: 'Deploy to Acceptance environment' variables: - group: 'DTSPortal-ACC' - group: 'DTSPortal-Secrets' jobs: - deployment: pool: vmImage: 'windows-latest' environment: 'ACC' strategy: runOnce: deploy: steps: - task: PowerPlatformToolInstaller@0 inputs: DefaultVersion: true - task: PowerPlatformChecker@0 inputs: PowerPlatformSPN: 'Acceptance Environment Desktop Services' FilesToAnalyze: '$(Pipeline.Workspace)/solution/dtsportal-managed.zip' RuleSet: '0ad12346-e108-40b8-a956-9a8f95ea18c9' - task: PowerPlatformImportSolution@0 inputs: authenticationType: 'PowerPlatformSPN' PowerPlatformSPN: 'Acceptance Environment Desktop Services' SolutionInputFile: '$(Pipeline.Workspace)/solution/dtsportal-managed.zip' AsyncOperation: true MaxAsyncWaitTime: '60' - task: PowerPlatformPublishCustomizations@0 inputs: authenticationType: 'PowerPlatformSPN' PowerPlatformSPN: 'Acceptance Environment Desktop Services' - stage: DeployPRD displayName: 'Deploy to Production / Live environment' variables: - group: 'DTSPortal-PRD' - group: 'DTSPortal-Secrets' jobs: - deployment: pool: vmImage: 'windows-latest' environment: 'PRD' strategy: runOnce: deploy: steps: - task: PowerPlatformToolInstaller@0 inputs: DefaultVersion: true - task: PowerPlatformChecker@0 inputs: PowerPlatformSPN: 'Production Environment Desktop Services' FilesToAnalyze: '$(Pipeline.Workspace)/solution/dtsportal-managed.zip' RuleSet: '0ad12346-e108-40b8-a956-9a8f95ea18c9' - task: PowerPlatformImportSolution@0 inputs: authenticationType: 'PowerPlatformSPN' PowerPlatformSPN: 'Production Environment Desktop Services' SolutionInputFile: '$(Pipeline.Workspace)/solution/dtsportal-managed.zip' AsyncOperation: true MaxAsyncWaitTime: '60' - task: PowerPlatformPublishCustomizations@0 inputs: authenticationType: 'PowerPlatformSPN' PowerPlatformSPN: 'Production Environment Desktop Services' - stage: Finalize displayName: 'Update main branch' variables: - group: 'DTSPortal-Secrets' jobs: - job: Cleanup pool: vmImage: 'windows-latest' steps: - task: PowerShell@2 displayName: 'Merge Development' inputs: targetType: 'inline' script: | git config user.email "marcboes@hotmail.com" git config user.name "from Pipeline" git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" checkout main git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" pull git merge 'origin/Development' git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push - task: DownloadPipelineArtifact@2 displayName: 'Download ACC artifact' inputs: buildType: 'current' artifactName: 'solution' targetPath: './ACC/solutions' - task: DownloadPipelineArtifact@2 displayName: 'Download PRD artifact' inputs: buildType: 'current' artifactName: 'solution' targetPath: './PRD/solutions' - task: PowerShell@2 displayName: 'Add ACC and PRD artifacts' inputs: targetType: 'inline' script: | git config user.email "marcboes@hotmail.com" git config user.name "from Pipeline" git add --all git commit -m 'Store Portal Solution Build $(Build.BuildID)' git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" pushname: Deploy Solution Apps_$(Date:yyyyMMdd)$(Rev:.r)trigger: nonestages: - stage: Build displayName: 'Build artifacts' variables: - group: 'DTSPortal-DEV' - group: 'DTSPortal-Secrets' jobs: - job: BuildDTSPortal pool: vmImage: 'windows-latest' steps: - task: PowerPlatformToolInstaller@0 inputs: DefaultVersion: true - task: PowerShell@2 displayName: 'Checkout Development branch' inputs: targetType: 'inline' script: | # DEVELOPMENT BRANCH git config user.email "marcboes@hotmail.com" git config user.name "from Pipeline" git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" checkout Development - task: PowerPlatformSetSolutionVersion@0 inputs: authenticationType: 'PowerPlatformSPN' PowerPlatformSPN: 'Development Environment Desktop Services' SolutionName: 'DesktopServicesPortalApps' SolutionVersionNumber: '1.0.0.$(Build.BuildId)' - task: PowerPlatformExportSolution@0 displayName: 'Export unmanaged solution' inputs: authenticationType: 'PowerPlatformSPN' PowerPlatformSPN: 'Development Environment Desktop Services' SolutionName: 'DesktopServicesPortalApps' SolutionOutputFile: '$(Build.SourcesDirectory)\source\solutions\DesktopServicesPortalApps-unmanaged.zip' AsyncOperation: true MaxAsyncWaitTime: '60' - task: PowerPlatformUnpackSolution@0 displayName: 'Unpack unmanaged solution' inputs: SolutionInputFile: '$(Build.SourcesDirectory)\source\solutions\DesktopServicesPortalApps-unmanaged.zip' SolutionTargetFolder: '$(Build.SourcesDirectory)\source\solutions\DesktopServicesPortalApps-unmanaged' OverwriteFiles: true SolutionType: Unmanaged - task: PowerPlatformExportSolution@0 displayName: 'Export managed solution' inputs: authenticationType: 'PowerPlatformSPN' PowerPlatformSPN: 'Development Environment Desktop Services' SolutionName: 'DesktopServicesPortalApps' SolutionOutputFile: '$(Build.SourcesDirectory)\source\solutions\DesktopServicesPortalApps-managed.zip' Managed: true AsyncOperation: true MaxAsyncWaitTime: '60' - task: PowerPlatformUnpackSolution@0 displayName: 'Unpack managed solution' inputs: SolutionInputFile: '$(Build.SourcesDirectory)\source\solutions\DesktopServicesPortalApps-managed.zip' SolutionTargetFolder: '$(Build.SourcesDirectory)\source\solutions\DesktopServicesPortalApps-managed' SolutionType: 'Managed' - task: PowerShell@2 displayName: 'Commit Portal Apps Solution' inputs: targetType: 'inline' script: | git add --all git commit -m 'Build Portal Apps Solution $(Build.BuildID)' git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin Development - task: PublishBuildArtifacts@1 inputs: PathtoPublish: 'source\solutions\DesktopServicesPortalApps-managed.zip' ArtifactName: solution publishLocation: 'Container' - stage: DeployACC displayName: 'Deploy to Acceptance environment' variables: - group: 'DTSPortal-ACC' - group: 'DTSPortal-Secrets' jobs: - deployment: pool: vmImage: 'windows-latest' environment: 'ACC' strategy: runOnce: deploy: steps: - task: PowerPlatformToolInstaller@0 inputs: DefaultVersion: true - task: PowerPlatformChecker@0 inputs: PowerPlatformSPN: 'Acceptance Environment Desktop Services' FilesToAnalyze: '$(Pipeline.Workspace)/solution/DesktopServicesPortalApps-managed.zip' RuleSet: '0ad12346-e108-40b8-a956-9a8f95ea18c9' - task: PowerPlatformImportSolution@0 inputs: authenticationType: 'PowerPlatformSPN' PowerPlatformSPN: 'Acceptance Environment Desktop Services' SolutionInputFile: '$(Pipeline.Workspace)/solution/DesktopServicesPortalApps-managed.zip' AsyncOperation: true MaxAsyncWaitTime: '60' - task: PowerPlatformPublishCustomizations@0 inputs: authenticationType: 'PowerPlatformSPN' PowerPlatformSPN: 'Acceptance Environment Desktop Services' - stage: DeployPRD displayName: 'Deploy to Production environment' variables: - group: 'DTSPortal-PRD' - group: 'DTSPortal-Secrets' jobs: - deployment: pool: vmImage: 'windows-latest' environment: 'PRD' strategy: runOnce: deploy: steps: - task: PowerPlatformToolInstaller@0 inputs: DefaultVersion: true - task: PowerPlatformChecker@0 inputs: PowerPlatformSPN: 'Production Environment Desktop Services' FilesToAnalyze: '$(Pipeline.Workspace)/solution/DesktopServicesPortalApps-managed.zip' RuleSet: '0ad12346-e108-40b8-a956-9a8f95ea18c9' - task: PowerPlatformImportSolution@0 inputs: authenticationType: 'PowerPlatformSPN' PowerPlatformSPN: 'Production Environment Desktop Services' SolutionInputFile: '$(Pipeline.Workspace)/solution/DesktopServicesPortalApps-managed.zip' AsyncOperation: true MaxAsyncWaitTime: '60' - task: PowerPlatformPublishCustomizations@0 inputs: authenticationType: 'PowerPlatformSPN' PowerPlatformSPN: 'Production Environment Desktop Services' - stage: Finalize displayName: 'Update main branch' variables: - group: 'DTSPortal-Secrets' jobs: - job: Cleanup pool: vmImage: 'windows-latest' steps: - task: PowerShell@2 displayName: 'Merge Development' inputs: targetType: 'inline' script: | git config user.email "marcboes@hotmail.com" git config user.name "from Pipeline" git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" checkout main git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" pull git merge 'origin/Development' git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push - task: DownloadPipelineArtifact@2 displayName: 'Download ACC artifact' inputs: buildType: 'current' artifactName: 'solution' targetPath: './ACC/solutions' - task: DownloadPipelineArtifact@2 displayName: 'Download PRD artifact' inputs: buildType: 'current' artifactName: 'solution' targetPath: './PRD/solutions' - task: PowerShell@2 displayName: 'Add the ACC and PRD artifacts' inputs: targetType: 'inline' script: | git config user.email "marcboes@hotmail.com" git config user.name "from Pipeline" git add --all git commit -m 'Store Portal Apps Build $(Build.BuildID)' git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" pushNadat met Azure DevOps de test- en live-omgevingen voorzien zijn van de ontwikkelconfiguratie en -solution, moeten enkele handelingen worden verricht om deze greed te maken voor gebruik. Voor beiden omgevingen betreft dat de SharePoint integratie op site niveau in de Portal Admin center. Voor de live-omgeving wordt daarnaast voor authenticatie Azure B2C en LinkedIn gebruikt in plaats van local accounts. Ook moeten de processen in de Solution nog worden bijgewerkt met correcte afzenderadressen en geactiveerd.
- Portal App > Settings > Authentication settings
- Disable vinkje in top regel na selecteren van Local sign in provider
- Configure Azure Active Directory B2C > Select login provider: Azure Active Directory B2C, Provider name: Azure AD B2C > Next > Azure AD B2C tenant: desktopservicesb2ctenant.onmicrosoft.com , Region: Netherlands > Next > Application name: DesktopServicesPortal, Reply URL: https://dts.powerappsportals.com (/signin-aad-b2c_1 is added) > Next > Policies > Create
- Configure LinkedIn > Select login provider: LinkedIn, Provider name: LinkedIn > Next
- Open LinkedIn en voeg Sign In with LinkedIn toe onder Products en de authorized redirect URL onder Auth 2.0 settings.
- Configure site settings, client ID (zie LinkedIn Auth), Client Secret (zie LinkedIn Auth) > Confirm > Close
- https://admin.powerplatform.microsoft.com > Marc Boes (DTS)'s Environment > Portals > Desktop Services, Manage > Setup SharePoint integration
- Klik op Enable SharePoint integration
- Accept > Close
- https://admin.powerplatform.microsoft.com > Marc Boes (DTS)'s Environment > Settings > Integration > Document Management Settings > Document Management Settings
- Entities: Whisky Collection, SharePoint Site: https://desktopservices.sharepoint.com/sites/desktopservicesportal (de site horend bij de Team aangemaakt in hoofdstuk Test- en Live-omgeving)
- Next > Next > Finish
- make.powerapps.com > Marc Boes (DTS)'s Environment > Solutions > Desktop Services Portal > Processes
- Send Email Confirmation To Contact, set email properties, change the from address, save and close, activate, activate, close
- Send Password Reset To Contact, set email properties, change the from address, save and close, activate, activate, close
The whisky entities imported must be assigned to a user, this can be done in Excel. Remove the dataflow afterwards and recreate if needed.
mkdir dtscomponentscd dtscomponentspac pcf init --namespace dtscomponents --name IFrameControl --template fieldcopy iframecontrol sample into the iframecontrol foldercopy LinearInputControl control (second level folder) into dtscomponents foldernpm run buildornpm run build -- --buildMode productionboth controls are build
correct namespaces: SampleNamespace > dtscomponents
dtspcfsolution.cdsproj, SolutionPackageType determines managed / unmanaged type
npm run build (samplenamespace not found anymore)
Create folder dtscomponents/dtspcfsolution
cd dtspcfsolution pac solution init --publisher-name desktopservices --publisher-prefix dtspac solution add-reference --path ..\ werkt alleen als de naam niet dubbel isdotnet build (2x)import, 2 customs controls in imported solution
iframe werkt, linearinput ook met whole number (bij FP is de control geen optie in classic view?)
Switching component met alternatief voor npm start watch
npx pcf-start --codePath D:\Data\2021\20211227PCF\dtscomponents\out\controls\LinearInputControl
npx pcf-start --codePath D:\Data\2021\20211227PCF\dtscomponents\out\controls\IFrameControl