Skip to content

Commit

Permalink
Merge pull request #5392 from ykuijs/Dev
Browse files Browse the repository at this point in the history
Fixed issue in AADConditionalAccessPolicy
  • Loading branch information
ykuijs authored Nov 13, 2024
2 parents d499dcb + c75a0e5 commit 99a4846
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# UNRELEASED

* AADConditionalAccessPolicy
* Fixed bug where an empty value was passed in the request for the
insiderRiskLevels parameter, which throws an error.
FIXES [#5389](https://github.com/microsoft/Microsoft365DSC/issues/5389)
* IntuneAccountProtectionLocalAdministratorPasswordSolutionPolicy
* Update property `PasswordAgeDays_AAD` to be lower-case.
FIXES [#5378](https://github.com/microsoft/Microsoft365DSC/issues/5378) (1/2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ function Get-TargetResource
$TransferMethods,

[Parameter()]
[ValidateSet('minor', 'moderate', 'elevated', 'unknownFutureValue')]
[System.String]
$InsiderRiskLevels,

Expand Down Expand Up @@ -949,6 +950,7 @@ function Set-TargetResource
$TransferMethods,

[Parameter()]
[ValidateSet('minor', 'moderate', 'elevated', 'unknownFutureValue')]
[System.String]
$InsiderRiskLevels,

Expand Down Expand Up @@ -1586,7 +1588,7 @@ function Set-TargetResource
}
}

if ($null -ne $InsiderRiskLevels)
if ([String]::IsNullOrEmpty($InsiderRiskLevels) -eq $false)
{
$conditions.Add("insiderRiskLevels", $InsiderRiskLevels)
}
Expand Down Expand Up @@ -2059,6 +2061,7 @@ function Test-TargetResource
$TransferMethods,

[Parameter()]
[ValidateSet('minor', 'moderate', 'elevated', 'unknownFutureValue')]
[System.String]
$InsiderRiskLevels,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class MSFT_AADConditionalAccessPolicy : OMI_BaseResource
[Write, Description("Name of the associated authentication strength policy.")] String AuthenticationStrength;
[Write, Description("Names of the associated authentication flow transfer methods. Possible values are '', 'deviceCodeFlow', 'authenticationTransfer', or 'deviceCodeFlow,authenticationTransfer'.")] String TransferMethods;
[Write, Description("Authentication context class references.")] String AuthenticationContexts[];
[Write, Description("Insider risk levels conditions.")] String InsiderRiskLevels;
[Write, Description("Insider risk levels conditions."), ValueMap{"minor", "moderate", "elevated", "unknownFutureValue"}, Values{"minor", "moderate", "elevated", "unknownFutureValue"}] String InsiderRiskLevels;
[Write, Description("Specify if the Azure AD CA Policy should exist or not."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
[Write, Description("Credentials for the Microsoft Graph delegated permissions."), EmbeddedInstance("MSFT_Credential")] string Credential;
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId;
Expand All @@ -60,3 +60,4 @@ class MSFT_AADConditionalAccessPolicy : OMI_BaseResource
[Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity;
[Write, Description("Access token used for authentication.")] String AccessTokens[];
};

0 comments on commit 99a4846

Please sign in to comment.