Chapters

References

Development Environment

Connect to Exchange Online

Test- and Live Environment

Connect to Exchange Online

Power Apps Solution

XrmToolBox Metadata Document Generator - Carl de Souza

Dynamics 365 Portal Confirm Email Error

Home page and Web Templates

Configure Search

Chatbot

Azure DevOps

Authentication

DTS Portal

Automatisch vertaalde tekst

Project Power Platform Portal based on Blank Portal Template

This project aims to get all facets of Power Portal Platforms set up. The following wish list has been taken as a starting point for this.

  1. The portal must be accessible to anonymous users
  2. Logged-in users must access Power Platform (Dataverse) tables
  3. Users should be able to manage their own account, including recovering forgotten passwords, and use an existing LinkedIn account.
  4. In addition to tables, documents must also be able to be placed and retrieved.
  5. Version control must be applied to the device
  6. There must be a separate development, test/acceptance and production environment.
  7. Changes to the development environment must be able to be transferred to the test/acceptance and production environment.
  8. It must be possible to switch between at least two languages in the portal.
  9. The portal must be provided with its own corporate identity.
  10. The portal must be equipped with search functionalities.
  11. It must be possible to place articles on the portal and these articles must be able to be translated automatically.
  12. In case of anonymous use, there must be a captcha check before a form can be submitted.
  13. It must be possible to display a Power BI dashboard on the portal.
  14. A chatbot functionality must be offered on the portal.
  15. The actions to arrange this must be recorded and described as an article on the portal.

These points are described in this article in the following chapters.

  1. Development environment
    Which tenants and which data-fresh environments have been created in them (Power Platform admin center). Here is described which settings have been made in the environment and which functionalities have been activated. This is where the first steps for multilingualism, support for documents and mail traffic take place. In the development environment, a Portal from Blank was then created.
  2. Test and Live environment
    The target environments are already prepared in this chapter. Because content must first be developed in the development environment, not much happens with these environments yet. That only takes place in the DevOps chapter. There, the Portal configuration, the Solution and start data are transferred to the target environments.
  3. Solution - Power Apps Article
    In addition to static web pages, the portal displays data stored in Dataverse tables. In addition, activating mail traffic from a Power Apps Portal requires that the sender is set up in system processes. Distribution of tables, processes, and workflows is only possible in a Power Apps Solution.
  4. Home, Design and Web Templates
    This chapter describes how the corporate identity is set up and how the start and article pages are designed. The article texts are stored in Power Apps Article Solution and can be automatically translated there using a Power Automate Flow.
  5. Search engine
    This chapter covers activating the search engine.
  6. Chatbot
    This chapter describes how to include a Power Virtual Agent in the Portal.
  7. Power BI
    This chapter covers placing a Power BI dashboard on the Portal.
  8. Azure DevOps
    To enable version control on the configurations and to automate the transfer of development environment to test/acceptance and production, Azure DevOps is used. This chapter describes these actions.
  9. Authentication settings and identity management
    For the development and test/acceptance environment, the ability to work with a local account has been left active. On the production environment, it has been replaced by Azure AD B2C and LinkedIn Identity Providers. It is also important that emails must be sent from the Portal to check email addresses.
  10. Solution pages and Dataflows
    This chapter describes how the solution pages are set up. Since data is first entered on the development environment, the adjustment of data flows between the environments is also included.
    • Solution - Whisky collection: linking Portal and document storage on SharePoint
      The Whisky collection app has been taken as a starting point to set up a solution for document management. The whisky collection table is linked to document storage on SharePoint. This chapter describes the steps on how to ensure that only the owner of a data line can make changes to both the table rule and its documents.
    • Solution - Power Automate Flow Documentation: Linking Portal and Azure Storage Accounts
      A Power Automate Documentation solution was used to place files on Azure Storage from the portal. Unlike the whisky collection example, the files must be accessible anonymously.
  11. Power Apps Component Framework
    For Power Apps Portal, the use of PCF controls is still in preview, so this is not yet ready for real use. To play with this topic, a control has been created that shows a URL in a text field in an IFrame, along with a slider to zoom out. That control is applied to a copy of the Power Automate Flow table.

Development Environment

Automatisch vertaalde tekst

The starting point is a paid Microsoft Business Standard and a free one by Microsoft made available Renewable E5. For both, there are restrictions in which environments can be made. For a test environment, a trial is sufficient. It expires every 30 days, but the the whole idea is that rolling out the portal to different environments is as easy as possible must be, so that's not a problem. The default environments are intended as a kind of common playground, so that option is not so suitable. That's why the development environment on my Business Standard tenant deployed for the live portal, and development takes place on the development environment of the Microsoft 365-E5 tenant.

  • Developer environment dts2021 tenant admin's Environment is automatically dropped.
  • admin.powerplatform.microsoft.com > dts2021 tenant admin's Environment > Edit
  • URL: dts2021-dev> Save
  • Settings
  • Product > Languages > Enable Dutch > Apply > OK
    During the wait, create the SharePoint Document Storage location (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
      Please note here that within a tenant only one organization (read environment) can be linked to a mailbox. When multiple environments are set up, you need multiple mailboxes.
  • make.powerapps.com > dts2021 tenant admin's Environment > Dataverse > Tables > Business Unit > Data > Edit in Excel
  • Rename 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 and tenant ID 6a81ac0b-1932-495a-b1bb-730db81ddc67 fixed. Register a client secret and save it 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

In addition to the Portal Configuration data, the portal contains web forms on Dataverse tables. To to be able to transfer between environments, a Solution is needed. Other components are also included in this. such as a workflow to translate article texts. Creating the solution goes as Follows.

  • 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: Desktop Services, Prefix: dts > Save > Create

Result Development environment

Test- and Live Environment

Automatisch vertaalde tekst

The steps to get the test and live environments ready to leave the development portal there countries, are as follows. There is quite a bit of waiting time, so take into account a few hours. On the other hand side, these environments are only fed once the DevOps pipelines are set up, so these actions can be completed during the development process.

Business Standard > Power Platform admin center

  • Live environment: developer environment is automatically dropped. Wait for the 2021 release wave 2 update becomes active.
  • admin.powerplatform.microsoft.com > Marc Boes (DTS)'s Environment > Edit
  • URL: dts-marcboes > Save
  • Settings
  • Product > Languages > Enable Dutch > Apply > OK
    During the wait, create the SharePoint Document Storage location (https://teams.microsoft.com )
  • Join or create a team > Create a Team > From Scratch > Private > Desktop Services Portal > 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
    Please note that within a tenant only one organization (read environment) can be linked to a mailbox. When multiple environments are set up, so you need multiple mailboxes.
  • make.powerapps.com > Marc Boes (DTS)'s Environment > Dataverse > Tables > Business Unit > Data > Edit in Excel
  • Change the name to 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
    Create a Blank Portal app install the portal packages.
  • Portal Management > Websites > temp > Delete > Delete
  • Apps > temp > Delete > Delete
  • portal.azure.com > App registrations > Power Apps DevOps Enterprise App (create or reuse)
  • Save client ID: 07b75880-00bc-4238-8241-0ff7a2545ef2, tenant ID 43de655e-999a-419a-bebb-37b748c36c0c and 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

Result Live environment

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

Microsoft 365-E5 > Platform admin center

Result Test environment

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

Power Apps Solution

Automatic translated content

The Power Apps Solution is the vehicle to distribute components such as processes, tables and Apps. The Portal solution initially contains an App to manage articles, email processes and a workflow to translate article texts. For the management of articles, a simple App is included in the solution. Each article has a number of chapters and each chapter has a category. By combining this data in the portal, it is easy to format it with icons and colors and a table of contents can also be generated as easily as possible. An article also has a 'translation' lookup column. A Power Automate Flow is triggered on this field and with that the text from another article is read out, translated and included in the body field.

Entity: DTS Article, Schema Name: dts_article

Attribute
Schema NameDisplay NameTypeDescription
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

Attribute
Schema NameDisplay NameTypeDescription
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

Attribute
Schema NameDisplay NameTypeDescription
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 a Cloud Flow to read an article translation.
<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 Finally, two out-of-the-box processes are included, because the sending email address must be put in there.

  • 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
  • [ ] Modify "Create New Message" Properties 'From'
  • [ ] Save and Close > Activate > Activate
  • [ ] Send Password Reset To Contact > Set "Create New Message" Properties
  • [ ] Modify "Create New Message" Properties 'From'
  • [ ] Save and Close > Activate > Activate

Home page and Web Templates

Automatisch vertaalde tekst
Follows...

Configure Search

Automatisch vertaalde tekst

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

Automatic translated content

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.

Add Power BI Dashboard

Automatisch vertaalde tekst
Follows...

Azure DevOps

Automatisch vertaalde tekst

Since as little configuration as possible takes place in the test and live environments, it is necessary to roll out the development environment for testing. For this purpose, two build pipelines and two release pipelines have been set up. The portal contains both static pages and pages that use Dataverse tables. There is therefore both a solution and a portal configuration that will be transferred. The records in these tables are not ported in these pipelines.
After the initial release, there are a number of one-off actions to set the authorisations and to create the web site app.

Test and live environment validation

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
    Because the Environment URL was changed in the first step, this step is necessary for the Portal App to work properly.
  • 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

Please note that the article tables are provided with keys on the 1:n side of the relations between article and article chapters and between article category and article chapter. Without setting these keys, dataflow does not support the import of the key fields for the articles.

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

name: Download DEV Portal Configuration to Repo_$(Date:yyyyMMdd)$(Rev:.r)                        trigger: none                        stages:              - stage: Build                displayName: 'Build artifacts'                variables:                  - group: 'Build-Release-DTSPortal-DEV'                  - group: 'Build-Release-DTSPortal-Secrets'                jobs:                  - job: BuildDTSPortal                    pool:                      vmImage: 'windows-latest'                    steps:                    - task: PowerShell@2                      inputs:                        targetType: 'inline'                        script: |                          # Delete previous install if any to prevent conflicts 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 Portal Data'                      inputs:                        targetType: 'inline'                        script: |                          $env:PATH = $env:PATH + ";" + "$(pacPath)"                          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                    - task: CopyFiles@2                      displayName: 'Base ACC Portal Configuration'                      inputs:                        SourceFolder: '$(Build.SourcesDirectory)\source\portals\desktop-services-portal'                        Contents: '**'                        TargetFolder: '$(Build.SourcesDirectory)\acc\portals\desktop-services-portal'                        OverWrite: true                    - task: CmdLine@2                      displayName: 'Specific ACC Portal Configuration'                      inputs:                        script: |                          cd $(Build.SourcesDirectory)                          copy /y "source\portals\desktop-services-portal\deployment-profiles\acc.portalbasictheme.css" "ACC\portals\desktop-services-portal\web-files\portalbasictheme.css"                     - task: CopyFiles@2                      displayName: 'Base PRD Portal Configuration'                      inputs:                        SourceFolder: '$(Build.SourcesDirectory)\source\portals\desktop-services-portal'                        Contents: '**'                        TargetFolder: '$(Build.SourcesDirectory)\prd\portals\desktop-services-portal'                        OverWrite: true                    - task: CmdLine@2                      displayName: 'Specific PRD Portal Configuration'                      inputs:                        script: |                          cd $(Build.SourcesDirectory)                          copy /y "source\portals\desktop-services-portal\deployment-profiles\prd.portalbasictheme.css" "PRD\portals\desktop-services-portal\web-files\portalbasictheme.css"                     - task: PowerPlatformToolInstaller@0                      inputs:                        DefaultVersion: true                    - 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: CmdLine@2                      displayName: 'Copy solution to ACC and PRD'                      inputs:                        script: |                          cd $(Build.SourcesDirectory)                          copy /y "source\solutions\dtsportal-managed.zip" "acc\solutions\dtsportal-managed.zip"                           copy /y "source\solutions\dtsportal-managed.zip" "prd\solutions\dtsportal-managed.zip"                     - task: CmdLine@2                      inputs:                        script: |                          echo commit all changes                          git config user.email "marcboes@hotmail.com"                          git config user.name "Automatic Build"                          git checkout main                          git add --all                          git commit -m "Latest solution changes."                          echo push code to new repo                          git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin main                          - stage: Publish                displayName: 'Publish artifacts'                jobs:                  - job: PublishDTSPortal                    pool:                      vmImage: 'windows-latest'                    steps:                    - task: PublishBuildArtifacts@1                      inputs:                        PathtoPublish: 'ACC/'                        ArtifactName: 'ACC'                        publishLocation: 'Container'                    - task: PublishBuildArtifacts@1                      inputs:                        PathtoPublish: 'PRD/'                        ArtifactName: 'PRD'                        publishLocation: 'Container'                          - stage: DeployACC                displayName: 'Deploy to Acceptance environment'                variables:                  - group: 'Build-Release-DTSPortal-ACC'                  - group: 'Build-Release-DTSPortal-Secrets'                jobs:                  - deployment:                     pool:                      vmImage: 'windows-latest'                    environment: 'ACC'                    strategy:                      runOnce:                        deploy:                          steps:                          - task: PowerPlatformToolInstaller@0                            inputs:                              DefaultVersion: true                          - task: NuGetCommand@2                            inputs:                              command: 'custom'                              arguments: 'install Microsoft.PowerApps.CLI -OutputDirectory pac'                          - task: PowerShell@2                            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                          - task: PowerPlatformChecker@0                            inputs:                              PowerPlatformSPN: 'Acceptance Environment Desktop Services'                              FilesToAnalyze: '$(Pipeline.Workspace)/ACC/solutions/dtsportal-managed.zip'                              RuleSet: '0ad12346-e108-40b8-a956-9a8f95ea18c9'                          - task: PowerPlatformImportSolution@0                            inputs:                              authenticationType: 'PowerPlatformSPN'                              PowerPlatformSPN: 'Acceptance Environment Desktop Services'                              SolutionInputFile: '$(Pipeline.Workspace)/ACC/solutions/dtsportal-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: 'Build-Release-DTSPortal-PRD'                  - group: 'Build-Release-DTSPortal-Secrets'                jobs:                  - deployment:                     pool:                      vmImage: 'windows-latest'                    environment: 'PRD'                    strategy:                      runOnce:                        deploy:                          steps:                          - task: PowerPlatformToolInstaller@0                            inputs:                              DefaultVersion: true                          - task: NuGetCommand@2                            inputs:                              command: 'custom'                              arguments: 'install Microsoft.PowerApps.CLI -OutputDirectory pac'                          - task: PowerShell@2                            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                          - task: PowerPlatformChecker@0                            inputs:                              PowerPlatformSPN: 'Production Environment Desktop Services'                              FilesToAnalyze: '$(Pipeline.Workspace)/PRD/solutions/dtsportal-managed.zip'                              RuleSet: '0ad12346-e108-40b8-a956-9a8f95ea18c9'                          - task: PowerPlatformImportSolution@0                            inputs:                              authenticationType: 'PowerPlatformSPN'                              PowerPlatformSPN: 'Production Environment Desktop Services'                              SolutionInputFile: '$(Pipeline.Workspace)/PRD/solutions/dtsportal-managed.zip'                              AsyncOperation: true                              MaxAsyncWaitTime: '60'                          - task: PowerPlatformPublishCustomizations@0                            inputs:                              authenticationType: 'PowerPlatformSPN'                              PowerPlatformSPN: 'Production Environment Desktop Services'            

Authentication

Automatisch vertaalde tekst

After Azure DevOps provides the test and live environments with the development configuration and solution, some operations must be performed to make it greed for use. For both environments involve the SharePoint integration at site level in the Portal Admin center. For the live environment is also used for authentication Azure B2C and LinkedIn instead of local Accounts. Also, the processes in the Solution still need to be updated with correct sender addresses and Activated.

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

Business to Consumer authentication

  • Portal App > Settings > Authentication settings
  • Disable check mark in top line after selecting 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 authentication

  • Configure LinkedIn > Select login provider: LinkedIn, Provider name: LinkedIn > Next
  • Open LinkedIn and add Sign In with LinkedIn under Products and the authorized redirect URL under Auth 2.0 settings.
  • Configure site settings, client ID (see LinkedIn Auth), Client Secret (see LinkedIn Auth) > Confirm > Close

SharePoint Integration

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 pages and Dataflows

Automatisch vertaalde tekst
Follows...

Custom Components (PCF)

Automatisch vertaalde tekst

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 works, linear input also with whole number (with FP the control is not an option in classic view?)
Switching component with alternative to 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