Skip to content

Commit b2f3720

Browse files
committed
removed skip reason NoExchangeAccess
1 parent 2652334 commit b2f3720

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

src/powershell/private/core/Add-ZtTestResultDetail.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function Add-ZtTestResultDetail {
6565
[Parameter(Mandatory = $false)]
6666
[string] $Title,
6767

68-
[ValidateSet('NotConnectedAzure', 'NotConnectedExchange', 'NoExchangeAccess', 'NotDotGovDomain', 'NotLicensedEntraIDP1', 'NotConnectedSecurityCompliance',
68+
[ValidateSet('NotConnectedAzure', 'NotConnectedExchange', 'NotDotGovDomain', 'NotLicensedEntraIDP1', 'NotConnectedSecurityCompliance',
6969
'NotLicensedEntraIDP2', 'NotLicensedEntraIDGovernance', 'NotLicensedEntraWorkloadID', 'NotSupported', 'UnderConstruction',
7070
'NotLicensedIntune', 'NoAzureAccess'
7171
)]

src/powershell/private/core/Get-ZtSkippedReason.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ function Get-ZtSkippedReason {
1212
switch($SkippedBecause){
1313
"NotConnectedAzure" { "Not connected to Azure." ; break}
1414
"NotConnectedExchange" { "Not connected to Exchange Online."; break}
15-
"NoExchangeAccess" { "The signed in user does not have the required permissions in Exchange Online to perform this test."; break}
1615
"NotConnectedSecurityCompliance" { "Not connected to Security & Compliance."; break}
1716
"NotDotGovDomain" { "This test is only for federal, executive branch, departments and agencies."; break}
1817
"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}

src/powershell/tests/Test-Assessment.35037.ps1

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,8 @@ function Test-Assessment-35037 {
4141

4242
#region Assessment Logic
4343
if ($errorMsg -or -not $auditConfig) {
44-
$errorText = if ($errorMsg) { $errorMsg.ToString() } else { '' }
45-
46-
# Determine skip reason based on error type
47-
if ($errorText -match 'Access Denied|permission|unauthorized|denied') {
48-
Write-PSFMessage 'Insufficient permissions to access Exchange Online audit configuration.' -Level Warning
49-
Add-ZtTestResultDetail -SkippedBecause NoExchangeAccess
50-
}
51-
else {
52-
Write-PSFMessage 'Not connected to Exchange Online.' -Level Warning
53-
Add-ZtTestResultDetail -SkippedBecause NotConnectedExchange
54-
}
44+
Write-PSFMessage 'Not connected to Exchange Online.' -Level Warning
45+
Add-ZtTestResultDetail -SkippedBecause NotConnectedExchange
5546
return
5647
}
5748

0 commit comments

Comments
 (0)