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

PR: update Intune assignment logic - Fixes 3892 and 3921 #3947

Merged
merged 6 commits into from
Nov 29, 2023

Conversation

William-Francillette
Copy link
Contributor

@William-Francillette William-Francillette commented Nov 24, 2023

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

  • M365DSCDRGUtil
    • Added ConvertFrom-IntunePolicyAssignment and ConvertTo-IntunePolicyAssignment
      FIXES #3892
  • IntuneWindowsAutopilotDeploymentProfileAzureADJoined
    • Modified assigned to use sdk instead of API call and added logic to use groupDisplayName in assignment
      FIXES #3892
  • IntuneWindowsAutopilotDeploymentProfileAzureADHybridJoined
    • Modified assigned to use sdk instead of API call and added logic to use groupDisplayName in assignment
      FIXES #3892
  • IntuneWindowsUpdateForBusinessRingUpdateProfileWindows10
    • Modified assigned to use sdk instead of API call and added logic to use groupDisplayName in assignment
      FIXES #3892
  • IntuneDeviceConfigurationPolicyWindows10
    • Modified assigned to use sdk instead of API call and added logic to use groupDisplayName in assignment
      FIXES #3921
  • IntuneDeviceEnrollmentStatusPageWindows10
    • Fixed assignments using API call
      FIXES #3921

@William-Francillette William-Francillette changed the title PR: update Intune assignment logic Fixes 3892 PR: update Intune assignment logic - Fixes 3892 and 3921 Nov 24, 2023
Copy link
Member

@ykuijs ykuijs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small comment

Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 Outdated Show resolved Hide resolved
@ykuijs
Copy link
Member

ykuijs commented Nov 28, 2023

@William-Francillette Unit tests are failing. Could you please have a look and fix them?

@William-Francillette
Copy link
Contributor Author

@William-Francillette Unit tests are failing. Could you please have a look and fix them?

@ykuijs all sorted now

Copy link
Member

@ykuijs ykuijs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ykuijs ykuijs merged commit 288e17f into microsoft:Dev Nov 29, 2023
2 checks passed
@Cyanic-Cloud
Copy link

Cyanic-Cloud commented Nov 30, 2023

@William-Francillette

Quick one, will any of the upcoming fixes help with configuration drift failing due to policy ID number in regards to IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10?

See below Event Viewer log:

<M365DSCEvent> <ConfigurationDrift Source="MSFT_IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10"> <ParametersNotInDesiredState> <Param Name="Id"><CurrentValue>f85e6911-73ae-4be6-ac69-0a567e2720e3</CurrentValue><DesiredValue>7ddcdcc9-b566-4805-a5e6-d4f2299131bd</DesiredValue></Param> </ParametersNotInDesiredState> </ConfigurationDrift> <DesiredValues>

**DSC Config Below:**

        IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10 "IntuneDeviceConfigurationHealthMonitoringConfigurationPolicyWindows10-Intune data collection policy"
    {
        AllowDeviceHealthMonitoring       = "enabled";
        ApplicationId                     = $ApplicationId
        Assignments                       = @(
            MSFT_DeviceManagementConfigurationPolicyAssignments{
                deviceAndAppManagementAssignmentFilterType = 'none'
                dataType = '#microsoft.graph.allDevicesAssignmentTarget'
            });
        CertificateThumbprint             = $Thumbprint
        ConfigDeviceHealthMonitoringScope = @("bootPerformance");
        Description                       = "";
        DisplayName                       = "Intune data collection policy";
        Ensure                            = "Present";
        Id                                = "7ddcdcc9-b566-4805-a5e6-d4f2299131bd";
        SupportsScopeTags                 = $True;
        TenantId                          = $TenantId
    }
    
    Its failing on ID, should this be the case?

@William-Francillette
Copy link
Contributor Author

@Cyanic-Cloud #3893 will fix the id issue
If you find anything else don't hesitate to raise an issue and will look at it

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants