Skip to content

MSFT_TeamsGroupPolicyAssignment: multiple groups in export #3785

Closed as not planned
@heizkoerperchen

Description

@heizkoerperchen

Description of the issue

When exporting TeamsGroupPolicyAssignments I'm getting multiple group ids and displaynames back and the right group is not even contained at all. This is caused by the way the groups are queried:

        $Group = Find-CsGroup -SearchQuery $item.GroupId

It is some type of fulltext search which gets in our case up to 5 groups back. This should be changed to

        $Group = Find-CsGroup -SearchQuery $item.GroupId -ExactMatchOnly $true

This has to be corrected in line 368 for the Export-TargetResource function and also in lines 72/82 in the Get-TargetResource function.

Microsoft 365 DSC Version

V1.23.920.2

Which workloads are affected

Teams

The DSC configuration

No response

Verbose logs showing the problem

No response

Environment Information + PowerShell Version

OsName               : Microsoft Windows 10 Enterprise        
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture       : 64-Bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage           : en-US
OsMuiLanguages       : {en-US, de-DE}

Key   : PSVersion
Value : 5.1.19041.3031
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.19041.3031
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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions