Skip to content

Commit

Permalink
Merge pull request #4260 from NikCharlebois/Managed-Identity-Teams
Browse files Browse the repository at this point in the history
Added Support for Managed Identity in Teams
  • Loading branch information
NikCharlebois authored Jan 26, 2024
2 parents e19fb12 + cbd9337 commit d42bd7f
Show file tree
Hide file tree
Showing 116 changed files with 1,198 additions and 255 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
* TeamsEmergencyCallRoutingPolicy
* Fix deletion of resource
FIXES [#4261](https://github.com/microsoft/Microsoft365DSC/issues/4261)
* TEAMS
* Added support for ManagedIdentity Authentication across Teams resources.
* DEPENDENCIES
* Updated MSCloudLoginAssistant dependencies to version 1.1.9.

# 1.24.124.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ function Get-TargetResource

[Parameter()]
[System.String]
$CertificateThumbprint
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)

New-M365DSCConnection -Workload 'MicrosoftTeams' `
Expand Down Expand Up @@ -116,6 +120,7 @@ function Get-TargetResource
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
ManagedIdentity = $ManagedIdentity.IsPresent
}
return [System.Collections.Hashtable] $results
}
Expand Down Expand Up @@ -187,7 +192,11 @@ function Set-TargetResource

[Parameter()]
[System.String]
$CertificateThumbprint
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)

New-M365DSCConnection -Workload 'MicrosoftTeams' `
Expand Down Expand Up @@ -327,7 +336,11 @@ function Test-TargetResource

[Parameter()]
[System.String]
$CertificateThumbprint
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)

#Ensure the proper dependencies are installed in the current environment.
Expand Down Expand Up @@ -441,7 +454,7 @@ function Export-TargetResource
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint

ManagedIdentity = $ManagedIdentity.IsPresent
}

$Results = Get-TargetResource @Params
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ class MSFT_TeamsAppPermissionPolicy : OMI_BaseResource
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId;
[Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId;
[Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint;
[Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity;
};
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ function Get-TargetResource

[Parameter()]
[System.String]
$CertificateThumbprint
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)

New-M365DSCConnection -Workload 'MicrosoftTeams' `
Expand Down Expand Up @@ -98,6 +102,7 @@ function Get-TargetResource
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
ManagedIdentity = $ManagedIdentity.IsPresent
}
return [System.Collections.Hashtable] $results
}
Expand Down Expand Up @@ -169,7 +174,11 @@ function Set-TargetResource

[Parameter()]
[System.String]
$CertificateThumbprint
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)

New-M365DSCConnection -Workload 'MicrosoftTeams' `
Expand Down Expand Up @@ -327,7 +336,11 @@ function Test-TargetResource

[Parameter()]
[System.String]
$CertificateThumbprint
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)

#Ensure the proper dependencies are installed in the current environment.
Expand Down Expand Up @@ -437,7 +450,7 @@ function Export-TargetResource
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint

ManagedIdentity = $ManagedIdentity.IsPresent
}

$Results = Get-TargetResource @Params
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ class MSFT_TeamsAppSetupPolicy : OMI_BaseResource
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId;
[Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId;
[Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint;
[Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity;
};
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ function Get-TargetResource

[Parameter()]
[System.String]
$CertificateThumbprint
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)

New-M365DSCConnection -Workload 'MicrosoftTeams' `
Expand Down Expand Up @@ -73,6 +77,7 @@ function Get-TargetResource
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
ManagedIdentity = $ManagedIdentity.IsPresent
}
return [System.Collections.Hashtable] $results
}
Expand Down Expand Up @@ -124,7 +129,11 @@ function Set-TargetResource

[Parameter()]
[System.String]
$CertificateThumbprint
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)

New-M365DSCConnection -Workload 'MicrosoftTeams' `
Expand Down Expand Up @@ -235,7 +244,11 @@ function Test-TargetResource

[Parameter()]
[System.String]
$CertificateThumbprint
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)

#Ensure the proper dependencies are installed in the current environment.
Expand Down Expand Up @@ -360,7 +373,7 @@ function Export-TargetResource
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint

ManagedIdentity = $ManagedIdentity.IsPresent
}

$Results = Get-TargetResource @Params
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ class MSFT_TeamsAudioConferencingPolicy : OMI_BaseResource
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId;
[Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId;
[Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint;
[Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity;
};
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ function Get-TargetResource

[Parameter()]
[System.String]
$CertificateThumbprint
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)

New-M365DSCConnection -Workload 'MicrosoftTeams' `
Expand Down Expand Up @@ -73,6 +77,7 @@ function Get-TargetResource
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
ManagedIdentity = $ManagedIdentity.IsPresent
}
return [System.Collections.Hashtable] $results
}
Expand Down Expand Up @@ -124,7 +129,11 @@ function Set-TargetResource

[Parameter()]
[System.String]
$CertificateThumbprint
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)

New-M365DSCConnection -Workload 'MicrosoftTeams' `
Expand Down Expand Up @@ -235,7 +244,11 @@ function Test-TargetResource

[Parameter()]
[System.String]
$CertificateThumbprint
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)

#Ensure the proper dependencies are installed in the current environment.
Expand Down Expand Up @@ -360,7 +373,7 @@ function Export-TargetResource
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint

ManagedIdentity = $ManagedIdentity.IsPresent
}

$Results = Get-TargetResource @Params
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ class MSFT_TeamsCallHoldPolicy : OMI_BaseResource
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId;
[Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId;
[Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint;
[Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity;
};
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ function Get-TargetResource

[Parameter()]
[System.String]
$CertificateThumbprint
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)

New-M365DSCConnection -Workload 'MicrosoftTeams' `
Expand Down Expand Up @@ -88,6 +92,7 @@ function Get-TargetResource
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
ManagedIdentity = $ManagedIdentity.IsPresent
}
return [System.Collections.Hashtable] $results
}
Expand Down Expand Up @@ -151,7 +156,11 @@ function Set-TargetResource

[Parameter()]
[System.String]
$CertificateThumbprint
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)

New-M365DSCConnection -Workload 'MicrosoftTeams' `
Expand Down Expand Up @@ -274,7 +283,11 @@ function Test-TargetResource

[Parameter()]
[System.String]
$CertificateThumbprint
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)

#Ensure the proper dependencies are installed in the current environment.
Expand All @@ -293,8 +306,8 @@ function Test-TargetResource

$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).Clone()
$ValuesToCheck.Remove('Identity') | Out-Null

$ValuesToCheck.Remove('Identity') | Out-Null
if ($CurrentValues.Ensure -eq 'Absent')
{
Write-Verbose -Message "Test-TargetResource returned $false"
Expand Down Expand Up @@ -399,7 +412,7 @@ function Export-TargetResource
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint

ManagedIdentity = $ManagedIdentity.IsPresent
}

$Results = Get-TargetResource @Params
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ class MSFT_TeamsCallParkPolicy : OMI_BaseResource
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId;
[Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId;
[Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint;
[Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity;
};
Loading

0 comments on commit d42bd7f

Please sign in to comment.