Skip to content

Commit b1a7451

Browse files
teams meeting
1 parent 163994d commit b1a7451

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
function Invoke-CIPPStandardTeamsMeetingVerification {
2+
<#
3+
.FUNCTIONALITY
4+
Internal
5+
.COMPONENT
6+
(APIName) TeamsMeetingVerification
7+
.SYNOPSIS
8+
(Label) Meeting Verification (ReCaptcha) for Teams
9+
.DESCRIPTION
10+
(Helptext) Configures the CAPTCHA verification for external users joining Teams meetings. This helps prevent unauthorized AI notetakers and bots from joining meetings.
11+
(DocsDescription) Configures the CAPTCHA verification for external users joining Teams meetings. This helps prevent unauthorized AI notetakers and bots from joining meetings. When enabled, external users from untrusted organizations or anonymous users will need to complete a CAPTCHA verification before joining meetings.
12+
.NOTES
13+
CAT
14+
Teams Standards
15+
TAG
16+
ADDEDCOMPONENT
17+
{"type":"autoComplete","required":true,"multiple":false,"creatable":false,"name":"standards.TeamsMeetingVerification.CaptchaVerificationForMeetingJoin","label":"CAPTCHA verification for meeting join","options":[{"label":"Not Required","value":"NotRequired"},{"label":"Anonymous Users and Untrusted Organizations","value":"AnonymousUsersAndUntrustedOrganizations"}]}
18+
IMPACT
19+
Low Impact
20+
ADDEDDATE
21+
2025-06-14
22+
POWERSHELLEQUIVALENT
23+
Set-CsTeamsMeetingPolicy -Identity Global -CaptchaVerificationForMeetingJoin AnonymousUsersAndUntrustedOrganizations
24+
RECOMMENDEDBY
25+
"Microsoft"
26+
UPDATECOMMENTBLOCK
27+
Run the Tools\Update-StandardsComments.ps1 script to update this comment block
28+
.LINK
29+
https://docs.cipp.app/user-documentation/tenant/standards/list-standards
30+
.LINK
31+
https://learn.microsoft.com/en-us/microsoftteams/join-verification-check
32+
#>
33+
##$Rerun -Type Standard -Tenant $Tenant -Settings $Settings 'TeamsMeetingVerification'
34+
35+
param($Tenant, $Settings)
36+
$CurrentState = New-TeamsRequest -TenantFilter $Tenant -Cmdlet 'Get-CsTeamsMeetingPolicy' -CmdParams @{Identity = 'Global' } | Select-Object CaptchaVerificationForMeetingJoin
37+
$CaptchaVerificationForMeetingJoin = $Settings.CaptchaVerificationForMeetingJoin.value ?? $Settings.CaptchaVerificationForMeetingJoin
38+
$StateIsCorrect = ($CurrentState.CaptchaVerificationForMeetingJoin -eq $CaptchaVerificationForMeetingJoin)
39+
40+
if ($Settings.remediate -eq $true) {
41+
if ($StateIsCorrect -eq $true) {
42+
Write-LogMessage -API 'Standards' -tenant $Tenant -message 'Teams Meeting Verification Policy already set.' -sev Info
43+
} else {
44+
$cmdParams = @{
45+
Identity = 'Global'
46+
CaptchaVerificationForMeetingJoin = $CaptchaVerificationForMeetingJoin
47+
}
48+
49+
try {
50+
New-TeamsRequest -TenantFilter $Tenant -Cmdlet 'Set-CsTeamsMeetingPolicy' -CmdParams $cmdParams
51+
Write-LogMessage -API 'Standards' -tenant $Tenant -message 'Updated Teams Meeting Verification Policy' -sev Info
52+
} catch {
53+
$ErrorMessage = Get-CippException -Exception $_
54+
Write-LogMessage -API 'Standards' -tenant $Tenant -message "Failed to set Teams Meeting Verification Policy. Error: $($ErrorMessage.NormalizedError)" -sev Error -LogData $ErrorMessage
55+
}
56+
}
57+
}
58+
59+
if ($Settings.alert -eq $true) {
60+
if ($StateIsCorrect -eq $true) {
61+
Write-LogMessage -API 'Standards' -tenant $Tenant -message 'Teams Meeting Verification Policy is set correctly.' -sev Info
62+
} else {
63+
Write-StandardsAlert -message 'Teams Meeting Verification Policy is not set correctly.' -object $CurrentState -tenant $Tenant -standardName 'TeamsMeetingVerification' -standardId $Settings.standardId
64+
Write-LogMessage -API 'Standards' -tenant $Tenant -message 'Teams Meeting Verification Policy is not set correctly.' -sev Info
65+
}
66+
}
67+
68+
if ($Settings.report -eq $true) {
69+
if ($StateIsCorrect) {
70+
$FieldValue = $true
71+
} else {
72+
$FieldValue = $CurrentState
73+
}
74+
Set-CIPPStandardsCompareField -FieldName 'standards.TeamsMeetingVerification' -FieldValue $FieldValue -Tenant $Tenant
75+
Add-CIPPBPAField -FieldName 'TeamsMeetingVerification' -FieldValue $StateIsCorrect -StoreAs bool -Tenant $Tenant
76+
}
77+
}

0 commit comments

Comments
 (0)