microsoft/Microsoft365DSC

PPPowerAppsEnvironment : hardcoded check for Certificate Thumbprint in Cert:\CurrentUser\My\

MarcelHeek opened this issue · 2 comments

Details of the scenario you tried and the problem that is occurring

I use a Github workflow where I add a certificate to the Cert:\LocalMachine\My certificate store. For other workloads, like SPO, TEAMS, OD, PLANNER this works just fine, but for the PP workload it fails as it expects the certificate in the CurrentUser certificate store

Verbose logs showing the problem

Exporting Microsoft 365 configuration for Workloads: PP
Finding all resources for workload {PP} and Mode {Full}
 
Authentication methods specified:
- Service Principal with Certificate Thumbprint
 
[1/3] Extracting [PPPowerAppsEnvironment] using {CertificateThumbprint}...Cannot find path 'Cert:\CurrentUser\My\***' because it does not exist.
Partial Export file was saved at: C:\Users\RUNNER~1\AppData\Local\Temp\332ee2db-7e9d-469e-bf1d-dbb9090c0d29.partial.ps1

Suggested solution to the issue

Make it work the same as for the other workloads

The DSC configuration that is used to reproduce the issue (as detailed as possible)

N/A

The operating system the target node is running

OsName               : Microsoft Windows Server 2022 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 20348.1.amd64fre.fe_release.210507-1500
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Version of the DSC module that was used ('dev' if using current dev branch)

Version Microsoft DSC installed: 1.23.111.1

This issue still exists, simply adding to currentuser 'fixes' it for now

This is coming from the PowerApps PowerShell module directly. For example, calling the Add-PowerAppsAccount cmdlet directly will throw the same error. Unfortunately it doesn't look like this requirement is documented anywhere.

image

I will update the Microsoft365DSC.com documentation to reflect this requirement.