diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e21b74a5f..1f6cecfb08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,13 @@ # UNRELEASED -* AADServicePrincipal - * FIXES [#5549](https://github.com/microsoft/Microsoft365DSC/issues/5549) * AADDeviceRegistrationPolicy * Fixes an error when trying to disable AAD join. +* AADRoleSetting + * Fixed issue where missing settings object for a role caused errors. + FIXES [#5602](https://github.com/microsoft/Microsoft365DSC/issues/5602) +* AADServicePrincipal + * FIXES [#5549](https://github.com/microsoft/Microsoft365DSC/issues/5549) * FabricAdminTenantSettings * Added support for the AllowGetOneLakeUDK, AllowMountDfCreation, AllowOneLakeUDK, ArtifactOrgAppPreview properties. diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleSetting/MSFT_AADRoleSetting.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleSetting/MSFT_AADRoleSetting.psm1 index 2af52a4d70..c3a63acd65 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleSetting/MSFT_AADRoleSetting.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADRoleSetting/MSFT_AADRoleSetting.psm1 @@ -278,7 +278,7 @@ function Get-TargetResource } #get Policyrule - $role = Get-MgBetaPolicyRoleManagementPolicyRule -UnifiedRoleManagementPolicyId $Policy.Policyid + $role = Get-MgBetaPolicyRoleManagementPolicyRule -UnifiedRoleManagementPolicyId $Policy.Policyid -ErrorAction SilentlyContinue $DisplayName = $RoleDefinition.DisplayName $ActivationMaxDuration = ($role | Where-Object { $_.Id -eq 'Expiration_EndUser_Assignment' }).AdditionalProperties.maximumDuration