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

MSFT_IntuneAppProtectionPolicyAndroid.schema.mof and MSFT_IntuneAppProtectionPolicyAndroid.ps1 have different properties #1955

Closed
andikrueger opened this issue May 19, 2022 · 2 comments · Fixed by scottgray69/Microsoft365DSC#13, #2091 or #2143
Labels
Bug Something isn't working Intune

Comments

@andikrueger
Copy link
Collaborator

As mentioned in the discussion below, there is an issue with the IntuneAppProtectionPolicyAndroid resource. The schema and the properties within the ps1 are different. This causes the exported configuration to fail during compilation.

MSFT_IntuneAppProtectionPolicyAndroid.schema needs to be adjusted to reflect the needed properties.

Discussed in https://github.com/microsoft/Microsoft365DSC/discussions/1947

Originally posted by MichielBouman May 17, 2022
I have successfully exported our Intune configuration and saved in M365TenantConfig.ps1. When I run the script I get a number of errors:

At C:\Users\mbo457\Documents\M365DSC\Intune_Settings_UWV\M365TenantConfig.ps1:526 char:114

  • ... = @(System.Collections.Generic.Dictionary`2[System.String,System.O ...
  •                                                             ~
    

Missing argument in parameter list.
At C:\Users\mbo457\Documents\M365DSC\Intune_Settings_UWV\M365TenantConfig.ps1:616 char:114

  • ... = @(System.Collections.Generic.Dictionary`2[System.String,System.O ...
  •                                                             ~
    

Missing argument in parameter list.
At C:\Users\mbo457\Documents\M365DSC\Intune_Settings_UWV\M365TenantConfig.ps1:768 char:114

  • ... = @(System.Collections.Generic.Dictionary`2[System.String,System.O ...
  •                                                             ~
    

Missing argument in parameter list.
At C:\Users\mbo457\Documents\M365DSC\Intune_Settings_UWV\M365TenantConfig.ps1:1306 char:121

  • ... = System.Collections.Generic.Dictionary`2[System.String,System.O ...
  •                                                             ~
    

Missing argument in parameter list.
At C:\Users\mbo457\Documents\M365DSC\Intune_Settings_UWV\M365TenantConfig.ps1:1442 char:121

  • ... = System.Collections.Generic.Dictionary`2[System.String,System.O ...
  •                                                             ~
    

Missing argument in parameter list.
At C:\Users\mbo457\Documents\M365DSC\Intune_Settings_UWV\M365TenantConfig.ps1:1491 char:121

  • ... = System.Collections.Generic.Dictionary`2[System.String,System.O ...
  •                                                             ~
    

Missing argument in parameter list.
At C:\Users\mbo457\Documents\M365DSC\Intune_Settings_UWV\M365TenantConfig.ps1:1677 char:121

  • ... = System.Collections.Generic.Dictionary`2[System.String,System.O ...
  •                                                             ~
    

Missing argument in parameter list.
At C:\Users\mbo457\Documents\M365DSC\Intune_Settings_UWV\M365TenantConfig.ps1:71 char:13

  •         IsAssigned                              = $True;
    
  •         ~~~~~~~~~~
    

The member 'IsAssigned' is not valid. Valid members are
'AllowedDataStorageLocations', 'AllowedInboundDataTransferSources', 'AllowedOutboundClipboardSharingLevel', 'AllowedOutboundDataTransferDestinations', 'ApplicationId', 'ApplicationSecret', 'Apps', 'Assignments',
'CertificateThumbprint', 'ContactSyncBlocked', 'Credential', 'DataBackupBlocked', 'DependsOn', 'Description', 'DeviceComplianceRequired', 'DisableAppPinIfDevicePinIsSet', 'DisplayName', 'Ensure', 'ExcludedGroups',
'FingerprintBlocked', 'ManagedBrowserToOpenLinksRequired', 'MaximumPinRetries', 'MinimumPinLength', 'OrganizationalCredentialsRequired', 'PeriodBeforePinReset', 'PeriodOfflineBeforeAccessCheck',
'PeriodOfflineBeforeWipeIsEnforced', 'PeriodOnlineBeforeAccessCheck', 'PinCharacterSet', 'PinRequired', 'PrintBlocked', 'PsDscRunAsCredential', 'SaveAsBlocked', 'SimplePinBlocked', 'TenantId'.
At C:\Users\mbo457\Documents\M365DSC\Intune_Settings_UWV\M365TenantConfig.ps1:72 char:13

  •         ManagedBrowser                          = "microsoftEdge" ...
    
  •         ~~~~~~~~~~~~~~
    

The member 'ManagedBrowser' is not valid. Valid members are
'AllowedDataStorageLocations', 'AllowedInboundDataTransferSources', 'AllowedOutboundClipboardSharingLevel', 'AllowedOutboundDataTransferDestinations', 'ApplicationId', 'ApplicationSecret', 'Apps', 'Assignments',
'CertificateThumbprint', 'ContactSyncBlocked', 'Credential', 'DataBackupBlocked', 'DependsOn', 'Description', 'DeviceComplianceRequired', 'DisableAppPinIfDevicePinIsSet', 'DisplayName', 'Ensure', 'ExcludedGroups',
'FingerprintBlocked', 'ManagedBrowserToOpenLinksRequired', 'MaximumPinRetries', 'MinimumPinLength', 'OrganizationalCredentialsRequired', 'PeriodBeforePinReset', 'PeriodOfflineBeforeAccessCheck',
'PeriodOfflineBeforeWipeIsEnforced', 'PeriodOnlineBeforeAccessCheck', 'PinCharacterSet', 'PinRequired', 'PrintBlocked', 'PsDscRunAsCredential', 'SaveAsBlocked', 'SimplePinBlocked', 'TenantId'.
At C:\Users\mbo457\Documents\M365DSC\Intune_Settings_UWV\M365TenantConfig.ps1:105 char:13

  •         IsAssigned                              = $False;
    
  •         ~~~~~~~~~~
    

The member 'IsAssigned' is not valid. Valid members are
'AllowedDataStorageLocations', 'AllowedInboundDataTransferSources', 'AllowedOutboundClipboardSharingLevel', 'AllowedOutboundDataTransferDestinations', 'ApplicationId', 'ApplicationSecret', 'Apps', 'Assignments',
'CertificateThumbprint', 'ContactSyncBlocked', 'Credential', 'DataBackupBlocked', 'DependsOn', 'Description', 'DeviceComplianceRequired', 'DisableAppPinIfDevicePinIsSet', 'DisplayName', 'Ensure', 'ExcludedGroups',
'FingerprintBlocked', 'ManagedBrowserToOpenLinksRequired', 'MaximumPinRetries', 'MinimumPinLength', 'OrganizationalCredentialsRequired', 'PeriodBeforePinReset', 'PeriodOfflineBeforeAccessCheck',
'PeriodOfflineBeforeWipeIsEnforced', 'PeriodOnlineBeforeAccessCheck', 'PinCharacterSet', 'PinRequired', 'PrintBlocked', 'PsDscRunAsCredential', 'SaveAsBlocked', 'SimplePinBlocked', 'TenantId'.
Not all parse errors were reported. Correct the reported errors and try again.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : MissingArgument

Any ideas how to solve these errors?
Thanks,
Michiel

@andikrueger andikrueger added Bug Something isn't working Intune labels May 19, 2022
menswearUK added a commit to scottgray69/Microsoft365DSC that referenced this issue Jun 9, 2022
change get to add back in the credentials info
changed test to rip it out as we don't need to compare that
removed id from export bcause it isn't currently supported
this ought to address issue microsoft#1955
@MichielBouman
Copy link

Dear @menswearUK , I have updated M365DSC to the latest version, but I still get the same errors when I run M365TenantConfig.ps1.
The versions that is installed is: 1.22.706.1
I have also updated the dependancies to the latest version.
Any idea what might cause these errors?
Thanks

@menswearUK
Copy link
Contributor

Sorry, I managed to close it when pulling into our own fork and the pull was never approved to the MS repo. I've made the changes again in a slightly less ambitious change which I've submitted today - if this gets approved it ought to fix the error, if it doesn't get approved I'll put in a straight fix for this issue immediately

NikCharlebois added a commit that referenced this issue Jul 25, 2022
MSFT_IntuneAppProtectionPolicyAndroid.psm1 remove Get-M365DSCIntuneAppProtectionPolicyAndroid function and fix #1955
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment