Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AADRoleSettings] Fixed issue where missing settings object for a role caused errors. #5644

Merged
merged 9 commits into from
Jan 17, 2025
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

* 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ function Get-TargetResource
}

$result = @{
AppId = $appInstance.DisplayName
AppId = $AADServicePrincipal.AppId
AppRoleAssignedTo = $AppRoleAssignedToValues
ObjectID = $AADServicePrincipal.Id
DisplayName = $AADServicePrincipal.DisplayName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Context -Name 'The app exists and values are already in the desired state' -Fixture {
BeforeAll {
$testParams = @{
AppId = 'App1'
AppId = 'b4f08c68-7276-4cb8-b9ae-e75fca5ff834'
DisplayName = 'App1'
AlternativeNames = 'AlternativeName1', 'AlternativeName2'
AccountEnabled = $true
Expand Down