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

Export may found multiple values for CsGroup.DisplayName and CSGroup.GroupId, then creates invalid export #3736

Closed
pkernevez opened this issue Oct 3, 2023 · 0 comments · Fixed by #3737 or #3808
Labels
Bug Something isn't working Teams V1.23.927.1 Version 1.23.927.1

Comments

@pkernevez
Copy link
Contributor

pkernevez commented Oct 3, 2023

Description of the issue

The query use for retrieving displayName and Id may return multiple values instead of the unique one.

In this case the displayname contains an array of string instead of the string.
For the GroupId, it contains an raay of on element and the element is the concatenation of the id but without quote.


        TeamsGroupPolicyAssignment "TeamsGroupPolicyAssignment-19"
        {
            ApplicationId         = $ConfigurationData.NonNodeData.ApplicationId;
            CertificateThumbprint = $ConfigurationData.NonNodeData.CertificateThumbprint;
            Ensure                = "Present";
            GroupDisplayName      = @("Management",Management External");
            GroupId               = @(4d458b94-af23-1234-a45c-a67c123a123123ab12c1-2ab3-1ab3-12a3-a1b2ab12345e);
            PolicyName            = "ter-asia-ondemand";
            PolicyType            = "TeamsComplianceRecordingPolicy";
            Priority              = 19;
            TenantId              = $OrganizationName;
        }

Microsoft 365 DSC Version

1.23.927.1

Which workloads are affected

Teams

The DSC configuration

Not fully sure, but it seems this append when a group has the same display name as another one plus something, like:
group1.displayName = "Management"

group2.displayName = "Management external"

Verbose logs showing the problem

No response

Environment Information + PowerShell Version

Find-CsGroup -SearchQuery "1234567-1234-1234-1234-1234567890ab"| fl

RunspaceId  : 7654321-1234-1234-1234-1234567890ab
Id          : 1234567-1234-1234-1234-1234567890ab
DisplayName : Management

RunspaceId  : 7654321-1234-1234-1234-1234567890ab
Id          : 1234567-1234-1234-1234-1234567890df
DisplayName : Management External

Adding the parameter -ExactMatchOnly $true solve the pb:

Find-CsGroup -SearchQuery "1234567-1234-1234-1234-1234567890ab" -ExactMatchOnly | fl

RunspaceId  : 7654321-1234-1234-1234-1234567890ab
Id          : 1234567-1234-1234-1234-1234567890ab
DisplayName : Management
 External
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Teams V1.23.927.1 Version 1.23.927.1
Projects
None yet
2 participants