Skip to content

Commit

Permalink
Update MS.AAD.8.2 test to allow "none"
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcave committed Sep 8, 2024
1 parent 05a0357 commit 215b9a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion powershell/public/cisa/entra/Test-MtCisaGuestInvitation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Rationale: By only allowing an authorized group of individuals to invite externa
#### Remediation action:

1. In **Entra ID** and **External Identities**, select **[External collaboration settings](https://entra.microsoft.com/#view/Microsoft_AAD_IAM/CompanyRelationshipsMenuBlade/~/Settings/menuId/Settings)**.
2. Under **Guest invite settings**, select **Only users assigned to specific admin roles can invite guest users**.
2. Under **Guest invite settings**, select **Only users assigned to specific admin roles can invite guest users** or **No one in the organization can invite guest users including admins (most restrictive)**.

3. Click **Save**.

#### Related links
Expand Down
10 changes: 5 additions & 5 deletions powershell/public/cisa/entra/Test-MtCisaGuestInvitation.ps1
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<#
.SYNOPSIS
Checks if guest invitiations are restricted to admins
Checks if guest invitations are restricted to admins
.DESCRIPTION
Only users with the Guest Inviter role SHOULD be able to invite guest users.
.EXAMPLE
Test-MtCisaGuestInvitation
Returns true if guest invitiations are restricted to admins
Returns true if guest invitations are restricted to admins
.LINK
https://maester.dev/docs/commands/Test-MtCisaGuestInvitation
Expand All @@ -25,12 +25,12 @@ function Test-MtCisaGuestInvitation {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion v1.0

$testResult = $result.allowInvitesFrom -eq "adminsAndGuestInviters"
$testResult = ($result.allowInvitesFrom -eq "adminsAndGuestInviters") -or ($result.allowInvitesFrom -eq "none")

if ($testResult) {
$testResultMarkdown = "Well done. Your tenant restricts who can invite guests:`n`n%TestResult%"
$testResultMarkdown = "Well done. Your tenant restricts who can invite guests:`n`nallowInvitesFrom : $($result.allowInvitesFrom)"
} else {
$testResultMarkdown = "Your tenant allows anyone to invite guests."
$testResultMarkdown = "Your tenant allows anyone to invite guests.`n`nallowInvitesFrom : $($result.allowInvitesFrom)"
}
Add-MtTestResultDetail -Result $testResultMarkdown
return $testResult
Expand Down

0 comments on commit 215b9a9

Please sign in to comment.