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

TeamsAudioConferencingPolicy: MeetingInvitePhoneNumbers should be a comma-separated string but is exported as array #4655

Closed
ricmestre opened this issue May 8, 2024 · 0 comments · Fixed by #4656 or #4674

Comments

@ricmestre
Copy link
Contributor

ricmestre commented May 8, 2024

Description of the issue

Like it already happened on other resources some properties are set in M365DSC as string arrays where the backend actually only accepts comma-separated strings, or M365DSC has the property set as string and the backend expects a string array, in this case this resource has property MeetingInvitePhoneNumbers which is a string in M365DSC, the cmdlets from Teams module also use a string but the backend returns a string array so we might end up with an array in the blueprint so if we try to reapply that config to another tenant it will fail since the cmdlets don't accept an array. Unfortunately I don't have the error message with me but it certainly doesn't work without making the conversion.

I'll send a PR to fix this.

EDIT: Was able to get the error message

Microsoft 365 DSC Version

1.24.424.1

Which workloads are affected

Teams

The DSC configuration

TeamsAudioConferencingPolicy "TeamsAudioConferencingPolicy-Tag:REDACTED"
        {
            AllowTollFreeDialin       = $True;
            Credential                = $Credscredential;
            Ensure                    = "Present";
            Identity                  = "Tag:REDACTED";
            MeetingInvitePhoneNumbers = @("XXXXXXXXX"); # Problem here
        }

Verbose logs showing the problem

Write-NodeMOFFile : Invalid MOF definition for node 'localhost': Exception calling "ValidateInstanceText" with "1" argument(s): "Convert property 'MeetingInvitePhoneNumbers' value from type 'STRING[]' to type   'STRING' failed
At line:29, char:2                                                                                                                                                                                                 Buffer:
onferencingPolicy";
};^
insta
"                                                                                                                                                                                                                  At C
:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:2369 char:21
+ ...             Write-NodeMOFFile $Name $mofNode $Script:NodeInstanceAlia ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (:) [Write-Error], InvalidOperationException
+ FullyQualifiedErrorId : InvalidMOFDefinition,Write-NodeMOFFile

Environment Information + PowerShell Version

N/A
@ricmestre ricmestre changed the title TeamsAudioConferencingPolicy: MeetingInvitePhoneNumbers should be a comma-separated string TeamsAudioConferencingPolicy: MeetingInvitePhoneNumbers should be a comma-separated string but is exported as array May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant