Skip to content

Commit

Permalink
Merge pull request #2449 from NikCharlebois/FIXES-#2447
Browse files Browse the repository at this point in the history
Fixes #2447
  • Loading branch information
NikCharlebois committed Oct 26, 2022
2 parents f9464a2 + 9f4f291 commit 36056f2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Expand Up @@ -17,7 +17,9 @@
* DEPENDENCIES
* Updated MSCloudLoginAssistant to version 1.0.96;
* MISC
* Add support for ManagedIdentity to the SPo and OD resources.
* Add support for ManagedIdentity to the SPO and OD resources.
* Fixed and issue with Export and ApplicationSecret where it wasn't properly converting to a PSCredential.
* FIXES [#2447](https://github.com/microsoft/Microsoft365DSC/issues/2447)

# 1.22.1019.1

Expand Down
4 changes: 3 additions & 1 deletion Modules/Microsoft365DSC/Modules/M365DSCReverse.psm1
Expand Up @@ -234,10 +234,12 @@ function Start-M365DSCConfigurationExtract
$AuthMethods -contains 'CertificatePath' -or `
$AuthMethods -contains 'ApplicationWithSecret')
{
[SecureString]$secStringPassword = ConvertTo-SecureString $ApplicationSecret -AsPlainText -Force
[PSCredential]$AppSecretAsPSCredential = New-Object System.Management.Automation.PSCredential ('ApplicationSecret', $secStringPassword)
$organization = Get-M365DSCTenantDomain -ApplicationId $ApplicationId `
-TenantId $TenantId `
-CertificateThumbprint $CertificateThumbprint `
-ApplicationSecret $ApplicationSecret `
-ApplicationSecret $AppSecretAsPSCredential `
-CertificatePath $CertificatePath
}
elseif ($AuthMethods -Contains 'Credentials')
Expand Down
2 changes: 1 addition & 1 deletion Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1
Expand Up @@ -1376,7 +1376,7 @@ function Get-M365DSCTenantDomain
$TenantId,

[Parameter(ParameterSetName = 'AppId')]
[System.String]
[System.Management.Automation.PSCredential]
$ApplicationSecret,

[Parameter(ParameterSetName = 'AppId')]
Expand Down

0 comments on commit 36056f2

Please sign in to comment.