Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
2fd993d
Added CIS M365v5 SPO tests
Feb 9, 2026
76e88b3
Update powershell/public/maester/spo/Test-MtSpoDefaultSharingLink.ps1
SamErde Feb 17, 2026
ac83443
Update powershell/public/maester/spo/Test-MtSpoB2BIntegration.md
SamErde Feb 17, 2026
f7dd070
Update website/docs/tests/maester/MT.1113.md
SamErde Feb 17, 2026
7869165
Update website/docs/tests/maester/MT.1118.md
SamErde Feb 17, 2026
5c88be6
changed invoke logic for spo tests
Mar 2, 2026
a6b37de
Updated CISM365v57-SPO
Mar 2, 2026
6554161
Merge branch 'main' into CISM365v57-SPO
HenrikPiecha Mar 2, 2026
ff61284
removed test that has been flagged as obsolet by cis
Mar 2, 2026
947e9bd
Merge branch
Mar 2, 2026
f3dcbed
Update powershell/public/maester/spo/Test-MtSpoGuestAccessExpiry.ps1
SamErde Apr 29, 2026
772b7c0
Update powershell/public/maester/spo/Test-MtSpoGuestCannotShareUnowne…
SamErde Apr 29, 2026
6850f8e
Update powershell/public/maester/spo/Test-MtSpoB2BIntegration.md
SamErde Apr 29, 2026
36ac2fa
Update powershell/public/maester/spo/Test-MtSpoGuestCannotShareUnowne…
SamErde Apr 29, 2026
c3ac6d7
Update powershell/public/maester/spo/Test-MtSpoPreventDownloadMalicio…
SamErde Apr 29, 2026
7b6f32e
Update website/docs/tests/maester/MT.1113.md
SamErde Apr 29, 2026
389f31a
Update powershell/public/Connect-Maester.ps1
SamErde May 5, 2026
6b2f02b
Update powershell/public/maester/spo/Test-MtSpoGuestCannotShareUnowne…
SamErde May 5, 2026
9ebb6be
Update powershell/Maester.psd1
SamErde May 5, 2026
328e18c
Update powershell/public/Connect-Maester.ps1
SamErde May 5, 2026
bbfc7e7
Update powershell/public/Connect-Maester.ps1
SamErde May 5, 2026
ada7781
Initial cleanup and update to the PR #1433
Mynster9361 May 8, 2026
155a59d
Merge branch 'main' into CIS-M365v6.0.1-SPO-tests-Chapter-7
Mynster9361 May 8, 2026
e8f8ff6
intial fixes to markdown files
Mynster9361 May 10, 2026
8211d95
Merge branch 'CIS-M365v6.0.1-SPO-tests-Chapter-7' of https://github.c…
Mynster9361 May 10, 2026
7e33999
update command based help
Mynster9361 May 10, 2026
e68b36f
updated code in cis tests
Mynster9361 May 10, 2026
1efb299
added connection for Maester to PnP.PowerShell
Mynster9361 May 10, 2026
eb4c6b8
added test and skip reason for NotConnectedSharePointOnline
Mynster9361 May 10, 2026
21c805d
updated commands with test for SharePointOnline
Mynster9361 May 10, 2026
405cdc6
Merge branch 'main' into CIS-M365v6.0.1-SPO-tests-Chapter-7
Mynster9361 May 10, 2026
9d77454
added files from update-commandreference due tothis error from build
Mynster9361 May 10, 2026
a6a0b8f
Merge branch 'CIS-M365v6.0.1-SPO-tests-Chapter-7' of https://github.c…
Mynster9361 May 10, 2026
c24c1a7
Merge branch 'main' into CIS-M365v6.0.1-SPO-tests-Chapter-7
SamErde May 11, 2026
ec00f86
minor additions and fixes after feedback
Mynster9361 May 11, 2026
a839c3b
Merge branch 'main' into CIS-M365v6.0.1-SPO-tests-Chapter-7
SamErde May 11, 2026
d950cc5
Did not see there already was a PR related to Sharepoint Online.
Mynster9361 May 11, 2026
2f436ee
Merge branch 'CIS-M365v6.0.1-SPO-tests-Chapter-7' of https://github.c…
Mynster9361 May 11, 2026
85fd443
Merge branch 'main' into CIS-M365v6.0.1-SPO-tests-Chapter-7
Mynster9361 May 12, 2026
8189cb1
Potential fix for pull request finding
SamErde May 18, 2026
7b102e2
Merge branch 'main' into CIS-M365v6.0.1-SPO-tests-Chapter-7
SamErde May 18, 2026
9e4f9dd
Merge branch 'main' into CIS-M365v6.0.1-SPO-tests-Chapter-7
Mynster9361 May 19, 2026
a2312fc
Potential fix for pull request finding
Mynster9361 May 19, 2026
362cc01
Merge branch 'main' into CIS-M365v6.0.1-SPO-tests-Chapter-7
SamErde May 21, 2026
97ba82f
checked everything tested the 3 implementation / authentication metho…
Mynster9361 May 22, 2026
a943a95
Merge branch 'CIS-M365v6.0.1-SPO-tests-Chapter-7' of https://github.c…
Mynster9361 May 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions powershell/Maester.Format.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,23 @@
}
</ScriptBlock>
</ListItem>
<ListItem>
<ItemSelectionCondition>
<ScriptBlock>
$null -ne $_.SharePoint
</ScriptBlock>
</ItemSelectionCondition>
<Label>SharePoint Online</Label>
<ScriptBlock>
if ($_.SharePoint) {
"Connected`n" +
"URL: $($_.SharePoint.Url)`n" +
"Tenant: $($_.SharePoint.Tenant)`n"
} else {
''
}
</ScriptBlock>
</ListItem>
<ListItem>
<ItemSelectionCondition>
<ScriptBlock>
Expand Down
11 changes: 9 additions & 2 deletions powershell/Maester.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
'Get-MailAuthenticationRecord', 'Get-MtAdminPortalUrl', 'Get-MtAuthenticationMethodPolicyConfig',
'Get-MtAzureManagementGroup', 'Get-MtConditionalAccessPolicy', 'Get-MtExo', 'Get-MtExoThreatPolicyMalware',
'Get-MtGraphScope', 'Get-MtGroupMember', 'Get-MtHtmlReport', 'Get-MtLicenseInformation', 'Get-MtMaesterApp', 'Get-MtRole',
'Get-MtRoleMember', 'Get-MtSafeMarkdown', 'Get-MtSession', 'Get-MtTestInventory', 'Get-MtUser',
'Get-MtRoleMember', 'Get-MtSafeMarkdown', 'Get-MtSession', 'Get-MtSpo', 'Get-MtTestInventory', 'Get-MtUser',
'Get-MtUserAuthenticationMethod', 'Get-MtUserAuthenticationMethodInfoByType', 'Import-MtMaesterResult',
'Install-MaesterTests', 'Invoke-Maester', 'Invoke-MtAzureRequest', 'Invoke-MtAzureResourceGraphRequest',
'Invoke-MtGraphRequest', 'Invoke-MtGraphSecurityQuery', 'Merge-MtMaesterResult', 'New-MtMaesterApp', 'Resolve-SPFRecord',
Expand Down Expand Up @@ -131,7 +131,14 @@
'Test-MtCisFormsPhishingProtectionEnabled', 'Test-MtCisGlobalAdminCount', 'Test-MtCisHostedConnectionFilterPolicy',
'Test-MtCisInternalMalwareNotification', 'Test-MtCisOutboundSpamFilterPolicy', 'Test-MtCisPasswordExpiry',
'Test-MtCisSafeAntiPhishingPolicy', 'Test-MtCisSafeAttachment', 'Test-MtCisSafeAttachmentsAtpPolicy',
'Test-MtCisSafeLink', 'Test-MtCisSharedMailboxSignIn', 'Test-MtCisTeamsLobbyBypass',
'Test-MtCisSafeLink', 'Test-MtCisSharedMailboxSignIn',
'Test-MtCisSpoB2BIntegration',
'Test-MtCisSpoDefaultSharingLink',
'Test-MtCisSpoDefaultSharingLinkPermission',
'Test-MtCisSpoGuestAccessExpiry',
'Test-MtCisSpoGuestCannotShareUnownedItem',
'Test-MtCisSpoPreventDownloadMaliciousFile',
'Test-MtCisTeamsLobbyBypass',
'Test-MtCisTeamsReportSecurityConcerns', 'Test-MtCisThirdPartyAndCustomApps',
'Test-MtCisThirdPartyApplicationsDisallowed', 'Test-MtCisThirdPartyFileSharing',
'Test-MtCisThirdPartyStorageServicesRestricted', 'Test-MtCisUserOwnedAppsRestricted',
Expand Down
21 changes: 11 additions & 10 deletions powershell/Maester.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@
## Initialize Module Variables
## Update Clear-ModuleVariable function in internal/Clear-ModuleVariable.ps1 if you add new variables here
$__MtSession = @{
GraphCache = @{}
GraphBaseUri = $null
TestResultDetail = @{}
Connections = @()
DnsCache = @()
ExoCache = @{}
OrcaCache = @{}
AIAgentInfo = $null
DataverseApiBase = $null # Resolved Dataverse OData API base URL (e.g. https://org123.api.crm.dynamics.com/api/data/v9.2)
DataverseResourceUrl = $null # Dataverse resource URL for token acquisition (e.g. https://org123.crm.dynamics.com)
GraphCache = @{}
GraphBaseUri = $null
TestResultDetail = @{}
Connections = @()
DnsCache = @()
ExoCache = @{}
OrcaCache = @{}
AIAgentInfo = $null
DataverseApiBase = $null # Resolved Dataverse OData API base URL (e.g. https://org123.api.crm.dynamics.com/api/data/v9.2)
DataverseResourceUrl = $null # Dataverse resource URL for token acquisition (e.g. https://org123.crm.dynamics.com)
DataverseEnvironmentId = $null # Environment identifier for display (e.g. org123.crm.dynamics.com)
SpoCache = @{} # Cache for SharePoint Online tenant settings retrieved via PnP
}
New-Variable -Name __MtSession -Value $__MtSession -Scope Script -Force

Expand Down
3 changes: 2 additions & 1 deletion powershell/internal/Clear-ModuleVariable.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

This function will be called for each fresh run of Invoke-Maester.
#>
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', '', Justification='Module variables used in other functions.')]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', '', Justification = 'Module variables used in other functions.')]
param()

Clear-MtGraphCache
Expand All @@ -21,5 +21,6 @@
Clear-MtExoCache
$__MtSession.AIAgentInfo = $null
$__MtSession.AzureDevOpsConnection = $null
$__MtSession.SpoCache = @{}
# $__MtSession.Connections = @() # Do not clear connections as they are used to track the connection state. This module variable should only be set by Connect-Maester and Disconnect-Maester.
}
55 changes: 28 additions & 27 deletions powershell/internal/Get-MtSkippedReason.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,33 @@
[string] $SkippedBecause
)

switch($SkippedBecause){
"NotConnectedAzure" { "Not connected to Azure. See [Connecting to Azure](https://maester.dev/docs/connect-maester/#connect-to-azure-exchange-online-and-teams)"; break}
"NotConnectedExchange" { "Not connected to Exchange Online. See [Connecting to Exchange Online](https://maester.dev/docs/connect-maester/#connect-to-azure-exchange-online-and-teams)"; break}
"NotConnectedSecurityCompliance" { "Not connected to Security & Compliance. See [Connecting to Security & Compliance](https://maester.dev/docs/connect-maester/#connect-to-azure-exchange-online-and-teams)"; break}
"NotConnectedTeams" { "Not connected to Teams. See [Connecting to Teams](https://maester.dev/docs/connect-maester/#connect-to-azure-exchange-online-and-teams)"; break}
"NotConnectedAzureDevOps" { "Not connected to Azure DevOps. See [Connecting to Azure DevOps](https://maester.dev/docs/connect-maester/#connect-to-azure-devops-optional)"; break}
"NotConnectedGraph" { "Not connected to Graph. See [Connect-Maester](https://maester.dev/docs/commands/Connect-Maester#examples)"; break}
"NotDotGovDomain" { "This test is only for federal, executive branch, departments and agencies. To override use [Test-MtCisaDmarcAggregateCisa -Force](https://maester.dev/docs/commands/Test-MtCisaDmarcAggregateCisa)"; break}
"NotLicensedEntraIDP1" { "This test is for tenants that are licensed for Entra ID P1. See [Entra ID licensing](https://learn.microsoft.com/entra/fundamentals/licensing)"; break}
"NotLicensedEntraIDP2" { "This test is for tenants that are licensed for Entra ID P2. See [Entra ID licensing](https://learn.microsoft.com/entra/fundamentals/licensing)"; break}
"NotLicensedEntraIDGovernance" { "This test is for tenants that are licensed for Entra ID Governance. See [Entra ID Governance licensing](https://learn.microsoft.com/entra/fundamentals/licensing#microsoft-entra-id-governance)"; break}
"NotLicensedEntraWorkloadID" { "This test is for tenants that are licensed for Entra Workload ID. See [Entra Workload ID licensing](https://learn.microsoft.com/entra/workload-id/workload-identities-faqs)"; break}
"NotLicensedEop" { "This test is for tenants that are licensed for Exchange Online Protection. See [Exchange Online Protection service description](https://learn.microsoft.com/en-us/office365/servicedescriptions/exchange-online-protection-service-description/exchange-online-protection-service-description)"; break}
"NotLicensedExoDlp" { "This test is for tenants that are licensed for Exchange Online DLP. See [Microsoft Purview Data Loss Prevention: Data Loss Prevention (DLP) for Exchange Online, SharePoint Online, and OneDrive for Business](https://learn.microsoft.com/en-us/office365/servicedescriptions/microsoft-365-service-descriptions/microsoft-365-tenantlevel-services-licensing-guidance/microsoft-365-security-compliance-licensing-guidance#which-licenses-provide-the-rights-for-a-user-to-benefit-from-the-service-7)"; break}
"NotLicensedMdo" { "This test is for tenants that are licensed for Defender for Office 365 Plan 2. See [Microsoft Defender for Office 365 service description](https://learn.microsoft.com/en-us/office365/servicedescriptions/office-365-advanced-threat-protection-service-description)"; break}
"NotLicensedMdoP2" { "This test is for tenants that are licensed for Defender for Office 365 Plan 2. See [Microsoft Defender for Office 365 service description](https://learn.microsoft.com/en-us/office365/servicedescriptions/office-365-advanced-threat-protection-service-description)"; break}
"NotLicensedMdoP1" { "This test is for tenants that are licensed for Defender for Office 365 Plan 1. See [Microsoft Defender for Office 365 service description](https://learn.microsoft.com/en-us/office365/servicedescriptions/office-365-advanced-threat-protection-service-description)"; break}
"NotLicensedAdvAudit" { "This test is for tenants that are licensed for Advanced Audit. See [Learn about auditing solutions in Microsoft Purview](https://learn.microsoft.com/en-us/purview/audit-solutions-overview#licensing-requirements)"; break}
"LicensedEntraIDPremium" { "This test is for tenants that are not licensed for any Entra ID Premium license. See [Entra ID licensing](https://learn.microsoft.com/entra/fundamentals/licensing)"; break}
"NotSupported" { "This test relies on capabilities not currently available (e.g., cmdlets that are not available on all platforms, Resolve-DnsName)"; break}
"NotSupportedAppPermission" { "This test relies on Graph APIs that don't support application permissions. Re-run Maester with a user signed in to view the results for this test."; break}
"LimitedPermissions" { "This test relies on privileged (i.e., ReadWrite) permissions."; break}
"NotLicensedDefenderXDR" { "This test is for tenants that are licensed for Microsoft Defender XDR. See [Microsoft Defender XDR prerequisites](https://learn.microsoft.com/en-us/defender-xdr/prerequisites#licensing-requirements)"; break}
"NotLicensedIntune" { "This test is for tenants that are licensed for Microsoft Intune. See [Intune licensing](https://learn.microsoft.com/intune/intune-service/fundamentals/licenses)"; break}
"NotAuthorized" { "This test was skipped because the user is not authorized to perform the required operation."; break}
"Error" { $SkippedBecause; break}
default { $SkippedBecause; break}
switch ($SkippedBecause) {
"NotConnectedAzure" { "Not connected to Azure. See [Connecting to Azure](https://maester.dev/docs/connect-maester/#connect-to-azure-exchange-online-and-teams)"; break }
"NotConnectedExchange" { "Not connected to Exchange Online. See [Connecting to Exchange Online](https://maester.dev/docs/connect-maester/#connect-to-azure-exchange-online-and-teams)"; break }
"NotConnectedSecurityCompliance" { "Not connected to Security & Compliance. See [Connecting to Security & Compliance](https://maester.dev/docs/connect-maester/#connect-to-azure-exchange-online-and-teams)"; break }
"NotConnectedTeams" { "Not connected to Teams. See [Connecting to Teams](https://maester.dev/docs/connect-maester/#connect-to-azure-exchange-online-and-teams)"; break }
"NotConnectedAzureDevOps" { "Not connected to Azure DevOps. See [Connecting to Azure DevOps](https://maester.dev/docs/connect-maester/#connect-to-azure-devops-optional)"; break }
"NotConnectedGraph" { "Not connected to Graph. See [Connect-Maester](https://maester.dev/docs/commands/Connect-Maester#examples)"; break }
"NotConnectedSharePoint" { "Not connected to SharePoint Online. See [Connecting to SharePoint Online](https://maester.dev/docs/connect-maester/)"; break }
"NotDotGovDomain" { "This test is only for federal, executive branch, departments and agencies. To override use [Test-MtCisaDmarcAggregateCisa -Force](https://maester.dev/docs/commands/Test-MtCisaDmarcAggregateCisa)"; break }
"NotLicensedEntraIDP1" { "This test is for tenants that are licensed for Entra ID P1. See [Entra ID licensing](https://learn.microsoft.com/entra/fundamentals/licensing)"; break }
"NotLicensedEntraIDP2" { "This test is for tenants that are licensed for Entra ID P2. See [Entra ID licensing](https://learn.microsoft.com/entra/fundamentals/licensing)"; break }
"NotLicensedEntraIDGovernance" { "This test is for tenants that are licensed for Entra ID Governance. See [Entra ID Governance licensing](https://learn.microsoft.com/entra/fundamentals/licensing#microsoft-entra-id-governance)"; break }
"NotLicensedEntraWorkloadID" { "This test is for tenants that are licensed for Entra Workload ID. See [Entra Workload ID licensing](https://learn.microsoft.com/entra/workload-id/workload-identities-faqs)"; break }
"NotLicensedEop" { "This test is for tenants that are licensed for Exchange Online Protection. See [Exchange Online Protection service description](https://learn.microsoft.com/en-us/office365/servicedescriptions/exchange-online-protection-service-description/exchange-online-protection-service-description)"; break }
"NotLicensedExoDlp" { "This test is for tenants that are licensed for Exchange Online DLP. See [Microsoft Purview Data Loss Prevention: Data Loss Prevention (DLP) for Exchange Online, SharePoint Online, and OneDrive for Business](https://learn.microsoft.com/en-us/office365/servicedescriptions/microsoft-365-service-descriptions/microsoft-365-tenantlevel-services-licensing-guidance/microsoft-365-security-compliance-licensing-guidance#which-licenses-provide-the-rights-for-a-user-to-benefit-from-the-service-7)"; break }
"NotLicensedMdo" { "This test is for tenants that are licensed for Defender for Office 365 Plan 2. See [Microsoft Defender for Office 365 service description](https://learn.microsoft.com/en-us/office365/servicedescriptions/office-365-advanced-threat-protection-service-description)"; break }
"NotLicensedMdoP2" { "This test is for tenants that are licensed for Defender for Office 365 Plan 2. See [Microsoft Defender for Office 365 service description](https://learn.microsoft.com/en-us/office365/servicedescriptions/office-365-advanced-threat-protection-service-description)"; break }
"NotLicensedMdoP1" { "This test is for tenants that are licensed for Defender for Office 365 Plan 1. See [Microsoft Defender for Office 365 service description](https://learn.microsoft.com/en-us/office365/servicedescriptions/office-365-advanced-threat-protection-service-description)"; break }
"NotLicensedAdvAudit" { "This test is for tenants that are licensed for Advanced Audit. See [Learn about auditing solutions in Microsoft Purview](https://learn.microsoft.com/en-us/purview/audit-solutions-overview#licensing-requirements)"; break }
"LicensedEntraIDPremium" { "This test is for tenants that are not licensed for any Entra ID Premium license. See [Entra ID licensing](https://learn.microsoft.com/entra/fundamentals/licensing)"; break }
"NotSupported" { "This test relies on capabilities not currently available (e.g., cmdlets that are not available on all platforms, Resolve-DnsName)"; break }
"NotSupportedAppPermission" { "This test relies on Graph APIs that don't support application permissions. Re-run Maester with a user signed in to view the results for this test."; break }
"LimitedPermissions" { "This test relies on privileged (i.e., ReadWrite) permissions."; break }
"NotLicensedDefenderXDR" { "This test is for tenants that are licensed for Microsoft Defender XDR. See [Microsoft Defender XDR prerequisites](https://learn.microsoft.com/en-us/defender-xdr/prerequisites#licensing-requirements)"; break }
"NotLicensedIntune" { "This test is for tenants that are licensed for Microsoft Intune. See [Intune licensing](https://learn.microsoft.com/intune/intune-service/fundamentals/licenses)"; break }
"NotAuthorized" { "This test was skipped because the user is not authorized to perform the required operation."; break }
"Error" { $SkippedBecause; break }
default { $SkippedBecause; break }
}
}
18 changes: 9 additions & 9 deletions powershell/public/Add-MtTestResultDetail.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
[ValidateSet('NotConnectedAzure', 'NotConnectedExchange', 'NotConnectedGraph', 'NotDotGovDomain', 'NotLicensedEntraIDP1', 'NotConnectedSecurityCompliance', 'NotConnectedTeams',
'NotLicensedEntraIDP2', 'NotLicensedEntraIDGovernance', 'NotLicensedEntraWorkloadID', 'NotLicensedExoDlp', "LicensedEntraIDPremium", 'NotSupported', 'Custom',
'NotLicensedMdo', 'NotLicensedMdoP2', 'NotLicensedMdoP1', 'NotLicensedAdvAudit', 'NotLicensedEop', 'Error', 'NotSupportedAppPermission', 'LimitedPermissions', 'NotLicensedDefenderXDR',
'NotLicensedCustomerLockbox','NotAuthorized', 'NotLicensedIntune', 'NotConnectedAzureDevOps'
'NotLicensedCustomerLockbox', 'NotAuthorized', 'NotLicensedIntune', 'NotConnectedAzureDevOps', 'NotConnectedSharePoint'
)]
[string] $SkippedBecause,

Expand Down Expand Up @@ -197,14 +197,14 @@
$TestInvestigate = $Investigate.IsPresent

$testInfo = @{
TestTitle = $TestTitle
TestDescription = $Description
TestResult = $Result
TestSkipped = $SkippedBecause
SkippedReason = $SkippedReason
TestInvestigate = $TestInvestigate
Severity = $Severity
Service = $Service
TestTitle = $TestTitle
TestDescription = $Description
TestResult = $Result
TestSkipped = $SkippedBecause
SkippedReason = $SkippedReason
TestInvestigate = $TestInvestigate
Severity = $Severity
Service = $Service
}

Write-MtProgress -Activity "Running tests" -Status $testName
Expand Down
Loading
Loading