Skip to content

Commit

Permalink
Merge pull request #2084 from NikCharlebois/Fix-2009
Browse files Browse the repository at this point in the history
Fixes 2009
  • Loading branch information
NikCharlebois authored Jul 8, 2022
2 parents 231d046 + 9c5eddb commit 454cd33
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 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

* IntuneAppProtectionPolicyiOS
* Fixed issue with creation a new policies where it was complaining about invalid minimum versions.
* Added the CustomBrowserProtocol paramters.
FIXES [#2009](https://github.com/microsoft/Microsoft365DSC/issues/2009)
* SCComplianceTag
* Fixed issue where FilePlanProperty was not properly applied unless another child property was also modified.
* DEPENDENCIES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ function Get-TargetResource
[System.String[]]
$ExcludedGroups,

[Parameter()]
[System.String]
$CustomBrowserProtocol,

[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
Expand Down Expand Up @@ -267,6 +271,7 @@ function Get-TargetResource
AppDataEncryptionType = $policy.AppDataEncryptionType
Assignments = $assignmentsArray
ExcludedGroups = $exclusionArray
CustomBrowserProtocol = $policy.CustomBrowserProtocol
Apps = $appsArray
Ensure = "Present"
Credential = $Credential
Expand Down Expand Up @@ -439,6 +444,10 @@ function Set-TargetResource
[System.String[]]
$ExcludedGroups,

[Parameter()]
[System.String]
$CustomBrowserProtocol,

[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
Expand Down Expand Up @@ -669,6 +678,10 @@ function Test-TargetResource
[System.String[]]
$ExcludedGroups,

[Parameter()]
[System.String]
$CustomBrowserProtocol,

[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Absent', 'Present')]
Expand Down Expand Up @@ -938,11 +951,39 @@ function Get-M365DSCIntuneAppProtectionPolicyiOSJSON
"simplePinBlocked": $($Parameters.SimplePinBlocked.ToString().ToLower()),
"minimumPinLength": $($Parameters.MinimumPinLength),
"managedBrowser": "$($Parameters.ManagedBrowser)",
"@
if ($Parameters.MinimumWarningAppVersion)
{
$JsonContent += @"
"minimumRequiredAppVersion": "$($Parameters.MinimumWarningAppVersion)",
"@
}
if ($Parameters.MinimumRequiredOsVersion)
{
$JsonContent += @"
"minimumRequiredOsVersion": "$($Parameters.MinimumRequiredOsVersion)",
"@
}
if ($Parameters.MinimumRequiredSdkVersion)
{
$JsonContent += @"
"minimumRequiredSdkVersion": "$($Parameters.MinimumRequiredSdkVersion)",
"@
}
if ($Parameters.MinimumWarningAppVersion)
{
$JsonContent += @"
"minimumWarningAppVersion": "$($Parameters.MinimumWarningAppVersion)",
"@
}
if ($Parameters.MinimumWarningOsVersion)
{
$JsonContent += @"
"minimumWarningOsVersion": "$($Parameters.MinimumWarningOsVersion)",
"@
}

$JSONContent += @"
"pinCharacterSet": "$($Parameters.PinCharacterSet)",
"contactSyncBlocked": $($Parameters.ContactSyncBlocked.ToString().ToLower()),
"periodBeforePinReset": "$($Parameters.PeriodBeforePinReset)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class MSFT_IntuneAppProtectionPolicyiOS : OMI_BaseResource
[Write, Description("List of IDs representing the iOS apps controlled by this protection policy.")] String Apps[];
[Write, Description("List of IDs of the groups assigned to this iOS Protection Policy.")] String Assignments[];
[Write, Description("List of IDs of the groups that are excluded from this iOS Protection Policy.")] String ExcludedGroups[];
[Write, Description("A custom browser protocol to open weblink on iOS.")] String CustomBrowserProtocol;
[Write, Description("Present ensures the policy exists, absent ensures it is removed."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure;
[Write, Description("Credentials of the Intune Admin."), EmbeddedInstance("MSFT_Credential")] string Credential;
[Write, Description("ID of the Azure Active Directory application to authenticate with.")] String ApplicationId;
Expand Down

0 comments on commit 454cd33

Please sign in to comment.