You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Details of the scenario you tried and the problem that is occurring
When I run the following commands in the PowerShell, everything seems to be working fine for IntuneAppProtectionPolicyiOS:
But when I use the DSC configuration for IntuneAppProtectionPolicyiOS to create a new IntuneAppProtectionPolicyiOS I get a different output of the attributes compared to PowerShell/GUI seems it's not working fine as it supposed to work because almost all attributes are mandatory, and you need to fill all of them to create a policy. MOF that is used to reproduce the issue (as detailed as possible) MOF file extract:
and then generate the MOF file and it works.
In this case we don't need this kind of approach because we want to have only attributes that we want, not all of them.
In PowerShell and in GUI, this kind of approach is possible.
So in this case I have looked a code of MSFT_IntuneAppProtectionPolicyiOS.ps1, and I found that there is possible to create a new IntuneAppProtectionPolicyiOS Policy only with attributes that you like.
Yes that's fine, but there is also a problem here, if you don't provide some attributes they are set by default to FALSE / Other Values.
Below you can check my solution.
PS C:\Windows\system32> Get-DeviceAppManagement_IosManagedAppProtections
displayName : iOS App Protection Policy
description : TestInune iOS
createdDateTime : 6/23/2022 9:26:27 AM
lastModifiedDateTime : 6/23/2022 9:26:27 AM
id : T_b35750de-47cf-448f-aeff-070413b23e45
version : "1c0303b1-0000-0d00-0000-62b431c30000"
periodOfflineBeforeAccessCheck : PT0S (set by default)
periodOnlineBeforeAccessCheck : PT5M (set by default)
allowedInboundDataTransferSources : allApps
allowedOutboundDataTransferDestinations : managedApps
organizationalCredentialsRequired : False (set by default)
allowedOutboundClipboardSharingLevel : allApps
dataBackupBlocked : True
deviceComplianceRequired : False (set by default)
managedBrowserToOpenLinksRequired : False (set by default)
saveAsBlocked : True
periodOfflineBeforeWipeIsEnforced : PT0S (set by default)
pinRequired : False (set by default)
maximumPinRetries : 5 (set by default)
simplePinBlocked : True
minimumPinLength : 6
pinCharacterSet : numeric (set by default)
periodBeforePinReset : PT0S (set by default)
allowedDataStorageLocations : {localStorage, oneDriveForBusiness, sharePoint}
contactSyncBlocked : False
printBlocked : False (set by default)
fingerprintBlocked : False (set by default)
disableAppPinIfDevicePinIsSet : False (set by default)
minimumRequiredOsVersion :
minimumWarningOsVersion :
minimumRequiredAppVersion :
minimumWarningAppVersion :
managedBrowser : notConfigured (set by default)
isAssigned : True
appDataEncryptionType : useDeviceSettings (set by default)
minimumRequiredSdkVersion :
deployedAppCount : 0 (set by default)
faceIdBlocked : False (set by default)
customBrowserProtocol :
assigmnets - (missing)
Here you can see that some attributes are set by default that I have not provided in the SET method, here is something wrong, and I think if there is a possibility to change it would be nice.
Also, the Assignments are Set, but they don't appear on the newly created policy here, seems something is definitely wrong.
#### The operating system the target node is running
<!--
Please provide as much as possible about the target node, for example
edition, version, build and language.
On OS with WMF 5.1 the following command can help get this information.
OsName : Microsoft Windows 10 Pro
OsOperatingSystemSKU : 48
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage : en-US
OsMuiLanguages : {en-US, de-DE}
-->
#### Version of the DSC module that was used ('dev' if using current dev branch)
1.22.615.1
The text was updated successfully, but these errors were encountered:
Details of the scenario you tried and the problem that is occurring
When I run the following commands in the PowerShell, everything seems to be working fine for IntuneAppProtectionPolicyiOS:
### Result - Output
But when I use the DSC configuration for IntuneAppProtectionPolicyiOS to create a new IntuneAppProtectionPolicyiOS I get a different output of the attributes compared to PowerShell/GUI seems it's not working fine as it supposed to work because almost all attributes are mandatory, and you need to fill all of them to create a policy.
MOF that is used to reproduce the issue (as detailed as possible)
MOF file extract:
### Result - Output of the DSC Configuration for IntuneAppProtectionPolicyiOS
So for this to work in DSC, you need to fill all the attributes required from the MSFT_IntuneAppProtectionPolicyiOS.ps1
See below:
and then generate the MOF file and it works.
In this case we don't need this kind of approach because we want to have only attributes that we want, not all of them.
In PowerShell and in GUI, this kind of approach is possible.
So in this case I have looked a code of MSFT_IntuneAppProtectionPolicyiOS.ps1, and I found that there is possible to create a new IntuneAppProtectionPolicyiOS Policy only with attributes that you like.
Yes that's fine, but there is also a problem here, if you don't provide some attributes they are set by default to FALSE / Other Values.
Below you can check my solution.
In JsonContent I provided only attributes that I need.
Result - Output
Here you can see that some attributes are set by default that I have not provided in the SET method, here is something wrong, and I think if there is a possibility to change it would be nice.
Also, the Assignments are Set, but they don't appear on the newly created policy here, seems something is definitely wrong.
The text was updated successfully, but these errors were encountered: