diff --git a/CHANGELOG.md b/CHANGELOG.md index f4dc1e40bc..c9428db8ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * AADApplication * Added support for Oauth2PermissionScopes. + * Fixes comparison issue for permissions. * TeamsMeetingPolicy * FIXES [#5550](https://github.com/microsoft/Microsoft365DSC/issues/5550) * MISC diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADApplication/MSFT_AADApplication.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADApplication/MSFT_AADApplication.psm1 index 72953ed80b..6619481744 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADApplication/MSFT_AADApplication.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADApplication/MSFT_AADApplication.psm1 @@ -1426,8 +1426,8 @@ function Test-TargetResource $CurrentValues = Get-TargetResource @PSBoundParameters - if ($CurrentValues.Permissions.Length -gt 0 -and ` - $null -ne $CurrentValues.Permissions.Name) + if ($CurrentValues.Permissions.Length -gt 0 -and $null -ne $CurrentValues.Permissions.Name -and ` + $Permissions.Length -gt 0) { $differenceObject = $Permissions.Name if ($null -eq $differenceObject)