diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTeam/MSFT_TeamsTeam.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTeam/MSFT_TeamsTeam.psm1 index a1e842c50f..0d918ca7d4 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTeam/MSFT_TeamsTeam.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTeam/MSFT_TeamsTeam.psm1 @@ -203,7 +203,7 @@ function Get-TargetResource Ensure = 'Present' } - if ($ConnectionMode -eq 'ServicePrincipal') + if ($ConnectionMode.StartsWith('ServicePrincipal')) { $result.Add('ApplicationId', $ApplicationId) $result.Add('TenantId', $TenantId) @@ -408,7 +408,7 @@ function Set-TargetResource $CurrentParameters.Owner = [array](($Owner[0]).ToString()) } Write-Verbose -Message "Connection mode: $ConnectionMode" - if ($ConnectionMode -eq 'ServicePrincipal') + if ($ConnectionMode.StartsWith('ServicePrincipal')) { $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftGraph' ` -InboundParameters $PSBoundParameters