From c3e7fe9447cb94b3df5dcf68c5751bdfc8eb303f Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Mon, 26 Jun 2023 16:27:59 -0400 Subject: [PATCH 1/2] Fixes #3390 --- CHANGELOG.md | 3 +++ .../DSCResources/MSFT_AADApplication/MSFT_AADApplication.psm1 | 1 + 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6662e9a7f..cf0c8988cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ # UNRELEASED +* AADApplication + * Updated the Test function to ignore the AppId parameter. + FIXES [#3390](https://github.com/microsoft/Microsoft365DSC/issues/3390) * AADAuthenticationMethodPolicyAuthenticator * Deprecated the NumberMatchingRequiredState Feature Setting. FIXES [#3406](https://github.com/microsoft/Microsoft365DSC/issues/3406) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADApplication/MSFT_AADApplication.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADApplication/MSFT_AADApplication.psm1 index 26f91298fa..0a8840e906 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADApplication/MSFT_AADApplication.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADApplication/MSFT_AADApplication.psm1 @@ -323,6 +323,7 @@ function Set-TargetResource $currentParameters.Remove('Ensure') | Out-Null $currentParameters.Remove('Credential') | Out-Null $currentParameters.Remove('ManagedIdentity') | Out-Null + $currentParameters.Remove('AppId') | Out-Null $backCurrentOwners = $currentAADApp.Owners $currentParameters.Remove('Owners') | Out-Null From e28b8a204ab49543a5d30f6cb167df1425369775 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Tue, 27 Jun 2023 06:34:23 -0400 Subject: [PATCH 2/2] Updates --- CHANGELOG.md | 12 ++++++------ .../MSFT_AADApplication/MSFT_AADApplication.psm1 | 1 - .../MSFT_AADServicePrincipal.psm1 | 2 ++ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0073abe378..0e56c958d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,11 +3,14 @@ # UNRELEASED * AADApplication - * Updated the Test function to ignore the AppId parameter. + * Updated the Set and Test function to ignore the AppId parameter. FIXES [#3390](https://github.com/microsoft/Microsoft365DSC/issues/3390) * AADAuthenticationMethodPolicyAuthenticator * Deprecated the NumberMatchingRequiredState Feature Setting. FIXES [#3406](https://github.com/microsoft/Microsoft365DSC/issues/3406) +* AADServicePrincipal + * Updated the Set and Test function to ignore the AppId parameter. + FIXES [#3390](https://github.com/microsoft/Microsoft365DSC/issues/3390) * EXOAvailabilityConfig * Fixes an error where an error was thrown when the OrgWideAccount wasn't set. FIXES [#3402](https://github.com/microsoft/Microsoft365DSC/issues/3402) @@ -18,13 +21,10 @@ * Added required application permissions to support [Application Based Authentication](https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-application-authentication) * MISC * Added API to the Organization.Read.All permission in the Get-M365DSCCompiledPermisisonList cmdlet - * Fixed Update-M365DSCAzureAdApplication where an error was thrown when multiple permissions were specified - for the same API. -* DEPENDENCIES - * Updated ReverseDSC to version 2.0.0.16. -* MISC * Fixes an issue with Update-M365DSCAzureAdApplication where it was throwing an error complaining about duplicate keys. FIXES #3417 +* DEPENDENCIES + * Updated ReverseDSC to version 2.0.0.16. # 1.23.621.1 diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADApplication/MSFT_AADApplication.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADApplication/MSFT_AADApplication.psm1 index 0a8840e906..26f91298fa 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADApplication/MSFT_AADApplication.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADApplication/MSFT_AADApplication.psm1 @@ -323,7 +323,6 @@ function Set-TargetResource $currentParameters.Remove('Ensure') | Out-Null $currentParameters.Remove('Credential') | Out-Null $currentParameters.Remove('ManagedIdentity') | Out-Null - $currentParameters.Remove('AppId') | Out-Null $backCurrentOwners = $currentAADApp.Owners $currentParameters.Remove('Owners') | Out-Null diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADServicePrincipal/MSFT_AADServicePrincipal.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADServicePrincipal/MSFT_AADServicePrincipal.psm1 index 7efd9fbeba..ac547aad31 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADServicePrincipal/MSFT_AADServicePrincipal.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADServicePrincipal/MSFT_AADServicePrincipal.psm1 @@ -301,6 +301,7 @@ function Set-TargetResource $currentParameters.Remove('Ensure') | Out-Null $currentParameters.Remove('ObjectID') | Out-Null $currentParameters.Remove('ApplicationSecret') | Out-Null + $currentParameters.Remove('AppId') | Out-Null # ServicePrincipal should exist but it doesn't if ($Ensure -eq 'Present' -and $currentAADServicePrincipal.Ensure -eq 'Absent') @@ -444,6 +445,7 @@ function Test-TargetResource $ValuesToCheck.Remove('CertificateThumbprint') | Out-Null $ValuesToCheck.Remove('ManagedIdentity') | Out-Null $ValuesToCheck.Remove('TenantId') | Out-Null + $ValuesToCheck.Remove('AppId') | Out-Null $TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) `