You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename Entra Connect related checks and move from test logic to cmdlets (#1244)
* Rename to match purpose
* Rewrite to limit test logic outside of cmdlet
* Remove Test-MtDomainsWithSsso from psd1
* Rename correctly
* Make sure unconnected Graph does not throw errors
Ensure Microsoft Entra seamless single sign-on is disabled for all domains.
4
+
5
+
.DESCRIPTION
6
+
Microsoft Entra seamless single sign-on (SSSO) provides users with easy access to cloud-based applications by automatically signing them in when they are on their corporate devices connected to the corporate network.
7
+
However, if not managed properly, it can introduce security risks, especially if devices are compromised or if there are misconfigurations.
8
+
9
+
.EXAMPLE
10
+
Test-MtEntraIDConnectSyncSsso
11
+
12
+
Returns true if Microsoft Entra seamless single sign-on is disabled
Add-MtTestResultDetail-SkippedBecause 'Custom'-SkippedCustomReason 'This test requires availability of Microsoft Defender for Identity and Microsoft Defender for Endpoint to get data from Defender XDR Advanced Hunting tables (IdentityLogonEvents and DeviceInfo).'
71
+
return$null
72
+
}
73
+
74
+
try {
75
+
$Query=@"
76
+
// Get all device info we can find
77
+
let devices = (
78
+
DeviceInfo
79
+
// Search for 14 days
80
+
| where TimeGenerated > ago(14d)
81
+
// Normalize DeviceName
82
+
// --> if it is an IP Address we keep it
83
+
// --> If it is not an IP Address we only use the hostname for correlation
$testResultMarkdown="Well done. We found no evidence of domains where Seamless Single SignOn was still enabled in EntraID Connect via the Microsoft Defender for Identity logs."
It "MT.1084: Seamless Single SignOn should be disabled for all domains in EntraID Connect servers. See https://maester.dev/docs/tests/MT.1084"-Tag "MT.1084"-Skip:( $EntraIDPlan-ne"P2" ) {
12
-
13
-
if ( $UnifiedMdiInfoAvailable-eq$false) {
14
-
Add-MtTestResultDetail-SkippedBecause 'Custom'-SkippedCustomReason 'This test requires availability of Microsoft Defender for Identity and Microsoft Defender for Endpoint to get data from Defender XDR Advanced Hunting tables (IdentityLogonEvents and DeviceInfo).'
$testResultMarkdown="Well done. We found no evidence of domains where Seamless Single SignOn was still enabled in EntraID Connect via the Microsoft Defender for Identity logs."
27
-
} else {
28
-
$testResultMarkdown="At least one domain has sign-ins with Seamless Single SignOn enabled in Entra ID Connect.`n`n%TestResult%"
Add-MtTestResultDetail-Result $testResultMarkdown-Description "Enabling Seamless SSO in Entra ID Connect introduces risks of lateral movement between your On-premise domain and Entra ID.`n`nIn the results you will find which domains, users and devices are still using Seamless SSO. Via the column 'Ssso expected' you can learn if Seamless SSO is expected to be used based on enriched device data.`n`nFor more information on the risks regarding Seamless SSO and how to remediate, see: https://maester.dev/docs/tests/MT.1084"-Severity "High"
45
-
$DomainsWithSsso.Count-eq"0"| Should -Be $True-Because "Seamless Single SignOn should be disabled for all domains in EntraID Connect servers."
It "MT.1084: Microsoft Entra seamless single sign-on should be disabled for all domains in EntraID Connect servers. See https://maester.dev/docs/tests/MT.1084"-Tag "MT.1084"-Skip:( $EntraIDPlan-ne"P2" ) {
11
+
Test-MtEntraIDConnectSyncSSO| Should -Be $True-Because "Microsoft Entra seamless single sign-on should be disabled for all domains in EntraID Connect servers."
0 commit comments