web
U bent offline. Dit is een alleen-lezen versie van de pagina.
close

Chapters

References

Ontwikkelomgeving

Connect to Exchange Online

Test- en Live omgeving

Connect to Exchange Online

Solution - Artikel App

XrmToolBox Metadata Document Generator - Carl de Souza

Dynamics 365 Portal Confirm Email Error

Startpagina, Web Templates

Zoekmachine

Chatbot

Azure DevOps

Authenticatie-instellingen

DTS Power Platform Portaal

Project Power Platform Portal op basis van Blank Portal Template

Dit project heeft als doel om alle facetten van Power Portal Platforms ingeregeld te krijgen. Daarvoor is het volgende verlanglijstje als vertrekpunt genomen.

  1. De portal moet toegankelijk zijn voor anonieme gebruikers
  2. Ingelogde gebruikers moeten toegang krijgen tot Power Platform (Dataverse) tabellen
  3. Gebruikers moeten zelf hun account kunnen beheren, inclusief het herstellen van vergeten wachtwoorden, en gebruik kunnen maken van een bestaand LinkedIn account.
  4. Naast tabellen, moeten ook documenten kunnen worden geplaatst en opgevraagd.
  5. Er moet versiebeheer op de inrichting toegepast worden
  6. Er moet een gescheiden ontwikkel-, test/acceptatie- en productieomgeving zijn.
  7. Wijzigingen in de ontwikkelomgeving moeten overgezet kunnen worden naar de test/acceptatie en productieomgeving.
  8. In de portal moet tussen minimaal twee talen kunnen worden gewisseld.
  9. De portal moet worden voorzien van een eigen huisstijl.
  10. De portal moet voorzien zijn van zoekfunctionaliteiten.
  11. Op de portal moeten artikelen geplaatst kunnen worden en deze artikelen moeten automatisch vertaald kunnen worden.
  12. Bij anoniem gebruik moet er een captcha check zijn voordat een formulier kan worden ingediend.
  13. Er moet een Power BI dashboard getoond kunnen worden op de portal.
  14. Er moet een chatbot functionaliteit worden aangeboden op de portal.
  15. De handelingen om dit in te regelen, moeten worden vastgelegd en beschreven als artikel op de portal.

Deze punten worden in dit artikel beschreven in de volgende hoofdstukken.

  1. Ontwikkelomgeving
    Welke tenants en welke dataverse omgevingen daarin zijn aangemaakt (Power Platform admin center). Hier wordt beschreven welke instellingen in de omgeving zijn aangebracht en welke functionaliteiten zijn geactiveerd. Hier vinden de eerste stappen plaats voor de meertaligheid, ondersteuning van documenten en van het mailverkeer. In de ontwikkelomgeving is vervolgens een Portal from Blank gemaakt.
  2. Test- en Live-omgeving
    De doelomgevingen worden in dit hoofdstuk alvast klaargezet. Omdat daar eerst in de ontwikkelomgeving content voor moet worden ontwikkeld, gebeurt er nog niet veel met deze omgevingen. Dat vindt pas plaats in het hoofdstuk DevOps. Daar wordt de Portal configuratie, de Solution en start data naar de doelomgevingen doorgezet.
  3. Solution - Power Apps Artikel
    Naast statische web pagina's, worden op het portaal gegevens getoond die in Dataversetabellen zijn opgeslagen. Bovendien vergt het activeren van mailverkeer uit een Power Apps Portal dat de verzender in systeem processen wordt ingesteld. Distributie van tabellen, processen en werkstromen kan alleen in een Power Apps Solution.
  4. Startpagina, Design en Web Templates
    In dit hoofdstuk wordt beschreven op welke manier de huisstijl is ingericht en op welke manier de start- en artikelpagina's zijn vormgegeven. De artikelteksten worden in Power Apps Artikel Solution opgeslagen en kunnen daar behulp van een Power Automate Flow automatisch worden vertaald.
  5. Zoekmachine
    Dit hoofdstuk behandelt het activeren van de zoekmachine.
  6. Chatbot
    In dit hoofdstuk wordt beschreven hoe een Power Virtual Agent kan worden opgenomen in de Portal.
  7. Power BI
    Dit hoofdstuk behandelt het plaatsen van een Power BI dashboard op de Portal.
  8. Azure DevOps
    Om versiebeheer op de configuraties mogelijk te maken en om het overzetten van ontwikkelomgeving naar test/acceptatie en productie te automatiseren, wordt gebruik gemaakt van Azure DevOps. In dit hoofdstuk worden deze handelingen beschreven.
  9. Authenticatie-instellingen en identiteitsbeheer
    Voor de ontwikkel- en test/acceptatieomgeving is de mogelijkheid om met lokale account te werken actief gelaten. Op de productieomgeving is die vervangen door Azure AD B2C en LinkedIn Identity Providers. Verder is het van belang dat vanuit de Portal emails gestuurd moeten worden om emailadressen te controleren.
  10. Solution pagina's en Dataflows
    In dit hoofdstuk wordt beschreven hoe de solution pagina's zijn ingericht. Aangezien gegevens in eerst op de ontwikkelomgeving zijn opgevoerd, is ook het inregelen van dataflows tussen de omgevingen opgenomen.
    • Solution - Whiskyverzameling: koppelen Portaal en documentopslag op SharePoint
      De Whiskyverzameling app is als uitgangspunt genomen om een oplossing voor documentbeheer in te richten. De whiskycollectie tabel is gekoppeld aan documentenopslag op SharePoint. In dit hoofdstuk staan de stappen beschreven hoe te zorgen dat alleen de eigenaar van een dataregel wijzigingen kan doorvoeren aan zowel de tabelregel als aan bijbehorende documenten.
    • Solution - Power Automate Flow Documentatie: koppelen Portaal en Azure Storage Accounts
      Een Power Automate Documentation oplossing is gebruikt om vanuit het portaal bestanden op Azure Storage te plaatsen. In tegenstelling tot het whiskyverzameling voorbeeld, moeten de bestanden anoniem toegankelijk zijn.
  11. Power Apps Component Framework
    Voor Power Apps Portal is het gebruik van PCF controls nog in preview, dus dit is nog niet gereed voor echt gebruik. Om alvast met dit onderwerp te spelen, is een control gemaakt dat een URL in een tekstveld in een IFrame toont, samen met een slider om uit te kunnen zoomen. Dat control is toegepast op een kopie van de Power Automate Flow tabel.

Ontwikkelomgeving

Inrichten van de ontwikkel- / bronomgeving

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

Resultaat Ontwikkelomgeving

Test- en Live omgeving

Inrichting doelomgevingen Test/Acceptatie en Productie/Live

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.

Business Standard > Power Platform admin center

  • 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

Resultaat Live omgeving

  • Environment URL: https://dts-marcboes.crm4.dynamics.com/
  • Tenant ID: 43de655e-999a-419a-bebb-37b748c36c0c (nodig voor DevOps Service connectie)
  • Application user: Power Apps DevOps Enterprise App, client id 07b75880-00bc-4238-8241-0ff7a2545ef2

Microsoft 365-E5 > Platform admin center

Resultaat Test omgeving

  • Environment URL: https://org6aa8e06c.crm4.dynamics.com/
  • Organization ID: 352a6ba7-dd67-4237-ab78-6ce2a88a7f79
  • Tenant ID: 6a81ac0b-1932-495a-b1bb-730db81ddc67 (nodig voor DevOps Service connectie)
  • Application user: Power Apps DevOps Enterprise App, client id 511a5141-ae68-4913-989a-da28606d06bc
  • Appication user secret: zie KeePass

Solution - Artikel App

Hulptabellen en bijbehorende App voor artikelen

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

Startpagina, Web Templates

Draft
Volgt...

Zoekmachine

draft

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)

Chatbot

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.

Power BI

draft
Volgt...

Azure DevOps

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.

Test- en liveomgeving validatie

Business Standard > App Maker > Marc Boes (DTS)'s Environment

  • 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.

Microsoft 365 E5 > App Maker > Field Service Trial

  • 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.

Azure DevOps

DevOps Pipelines

Het project is opgesplitst in vier features:

  1. De configuratie van de Power Portal.
    Hier wordt ook de ontwikkelde design elementen beheerd.
  2. Een solution met de Portal specifieke aanpassingen aan de Dataverse.
    In deze solution is ook de artikel app opgenomen, omdat deze puur voor de portal is gemaakt.
  3. Een solution met apps die wel op de Portal worden getoond, maar er feitelijk los van staan.
    De twee apps die hiervoor zijn genomen, zijn een whiskyverzameling app (vanwege de koppeling met bestanden op SharePoint) en een Power Automate Flow repository (vanwege de koppeling met bestanden op Azure Storage Accounts).
  4. Een PCF solution met hierin experimenteer materiaal om een veld te tonen als iFrame inclusief een zoomslider.
    Elke feature heeft zijn eigen deployment pipeline. De opbouw is vrijwel gelijk, alleen de Portal configuratie heeft enkele extra stappen omdat de package verschilt tussen Dev, Acc en Prd.

pa-portal pipeline

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)'

solution-portal pipeline

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)" push

solution-apps pipeline

name: 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)" push

Authenticatie-instellingen

Nadat 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.

Business Standard > make.preview.powerapps.com > Marc Boes (DTS)'s Environment

Business to Consumer authenticatie

  • 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

LinkedIn authenticatie

  • 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

SharePoint Integratie

Portal emails

  • 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

Entity Permissions

The whisky entities imported must be assigned to a user, this can be done in Excel. Remove the dataflow afterwards and recreate if needed.

Solution pagina's en Dataflows

draft
Volgt...

Custom Components (PCF)

draft

Multicomponents in one solution notes

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 production

both 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