microsoft / Microsoft365DSC

Manages, configures, extracts and monitors Microsoft 365 tenant configurations
https://aka.ms/M365DSC
MIT License
1.64k stars 503 forks source link

TeamsAppSetupPolicy : Test-DSCConfiguration reporting incorrectly as "NotinDesiredState" when there is $null value #5080

Open subhashvinjamuri opened 2 months ago

subhashvinjamuri commented 2 months ago

Description of the issue

Below screenshot from event viewer (and also same from - "Test-DscConfiguration -ReferenceConfiguration <pathof .mof file> ) This is for the resource : MSFT_TeamsAppSetupPolicy (not sure if any other resource may have same problem). The properties AppPresetMeetingList , PinnedMessageBarApps are reported as 'NotinDesiredState' ., even though those properties were neighter set in the tenant, not in the config, for Teams App setup Policy

Microsoft 365 DSC Version

v1.24.417.1

Which workloads are affected

Teams

The DSC configuration

removed applicationId, tenant and certthumbrint info below for security reasons.

Verbose logs showing the problem

<M365DSCEvent>
    <ConfigurationDrift Source="MSFT_TeamsAppSetupPolicy" TenantId="bloombergcorpdev.onmicrosoft.com">
        <ParametersNotInDesiredState>
            <Param Name="AppPresetMeetingList"></Param>
            <Param Name="PinnedMessageBarApps"></Param>
        </ParametersNotInDesiredState>
    </ConfigurationDrift>
    <DesiredValues>
        <Param Name ="Identity">Pilot - M365 Copilot - App Upload</Param>
        <Param Name ="Description">As per SDSK 1279191993 to test M365 copilot Teams</Param>
        <Param Name ="AppPresetList">89fb6b53-d5d6-4077-a412-f55f1fd3830a</Param>
        <Param Name ="AppPresetMeetingList">$null</Param>
        <Param Name ="PinnedAppBarApps">14d6962d-6eeb-4f48-8890-de55454bb136 86fcd49b-61a2-4701-b771-54728cd291fb 2a84919f-59d8-4441-a975-2a8c2643b741 4715ddc1-3ac8-47cf-b473-ce2db80f347e b5abf2ae-c16b-4310-8f8a-d3bcdb52f162</Param>
        <Param Name ="PinnedMessageBarApps">$null</Param>
        <Param Name ="AllowUserPinning">True</Param>
        <Param Name ="AllowSideLoading">True</Param>
        <Param Name ="Ensure">Present</Param>
        <Param Name ="ApplicationId">xxxxx</Param>
        <Param Name ="TenantId">xxxxx</Param>
        <Param Name ="CertificateThumbprint">xxxxx</Param>
        <Param Name ="Verbose">True</Param>
    </DesiredValues>
    <CurrentValues>
        <Param Name ="PinnedAppBarApps">14d6962d-6eeb-4f48-8890-de55454bb136 86fcd49b-61a2-4701-b771-54728cd291fb 2a84919f-59d8-4441-a975-2a8c2643b741 4715ddc1-3ac8-47cf-b473-ce2db80f347e b5abf2ae-c16b-4310-8f8a-d3bcdb52f162</Param>
        <Param Name ="ApplicationId">xxxxx</Param>
        <Param Name ="CertificateThumbprint">xxxxx</Param>
        <Param Name ="PinnedMessageBarApps">$null</Param>
        <Param Name ="AllowUserPinning">True</Param>
        <Param Name ="Credential">$null</Param>
        <Param Name ="ManagedIdentity">False</Param>
        <Param Name ="AllowSideLoading">True</Param>
        <Param Name ="Identity">Pilot - M365 Copilot - App Upload</Param>
        <Param Name ="Description">As per SDSK 1279191993 to test M365 copilot Teams</Param>
        <Param Name ="AppPresetList">89fb6b53-d5d6-4077-a412-f55f1fd3830a</Param>
        <Param Name ="Ensure">Present</Param>
        <Param Name ="TenantId">xxxxx</Param>
        <Param Name ="AppPresetMeetingList">$null</Param>
    </CurrentValues>
</M365DSCEvent>

Environment Information + PowerShell Version

OsName               : Microsoft Windows Server 2019 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 1809
WindowsBuildLabEx    : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Key   : PSVersion
Value : 5.1.17763.6189
Name  : PSVersion

Key   : PSEdition
Value : Desktop
Name  : PSEdition

Key   : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0...}
Name  : PSCompatibleVersions

Key   : BuildVersion
Value : 10.0.17763.6189
Name  : BuildVersion

Key   : CLRVersion
Value : 4.0.30319.42000
Name  : CLRVersion

Key   : WSManStackVersion
Value : 3.0
Name  : WSManStackVersion

Key   : PSRemotingProtocolVersion
Value : 2.3
Name  : PSRemotingProtocolVersion

Key   : SerializationVersion
Value : 1.1.0.1
Name  : SerializationVersion
subhashvinjamuri commented 1 month ago

Hi, Does anyone has any input on this ? This is for TeamsAppSetup Policy. Currently, we did not have any values for AppPresetMeetingList, PinnedMessageBarApps for any existing policy. When I exported from tenant, those attributes were not mentioned as there was nothing configured. I am re-deploying same export to tenant. Now it says these two attributes are 'NOT In Desired State' for each AppSetup policy. So the Test-DSCConfiguration fails.

subhashvinjamuri commented 1 month ago

@NikCharlebois Any guidance on this is appreciated.