Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
cc5e48a
initial commit
sandeepjha000 Jan 5, 2026
c94eab2
Adding test for assessment 25395
aahmed-spec Jan 6, 2026
c7c7398
Feature-35009
Manoj-Kesana Jan 6, 2026
56b7637
Updated region markers and app conditional check
aahmed-spec Jan 6, 2026
4e0014e
added test file
ashwinikarke Jan 6, 2026
4cf5067
taken pull
ashwinikarke Jan 6, 2026
b1f861f
removed extra lines
aahmed-spec Jan 6, 2026
408cd8e
Update src/powershell/tests/Test-Assessment.35009.ps1
Manoj-Kesana Jan 6, 2026
608ceef
Update src/powershell/tests/Test-Assessment.35009.ps1
Manoj-Kesana Jan 6, 2026
c7f977e
Fixed the evaluation logic
Manoj-Kesana Jan 6, 2026
fd0029e
refactored report table
sandeepjha000 Jan 6, 2026
6708695
adding blade links to profiles and policies
sandeepjha000 Jan 7, 2026
ae8e049
updated comments and word capitalization
sandeepjha000 Jan 7, 2026
bc856ef
add support for AIPService
komalp2025 Jan 7, 2026
9d6b6dc
add md file
komalp2025 Jan 7, 2026
f6bee36
added test file
ashwinikarke Jan 7, 2026
9684145
Merge pull request #749 from microsoft/Feature-35009
SagarSathe Jan 7, 2026
0a648d9
Initial plan
Copilot Jan 7, 2026
6a0065d
Extract AD ports to constant $AD_WELL_KNOWN_PORTS
Copilot Jan 7, 2026
4bdf259
Merge pull request #752 from microsoft/copilot/sub-pr-747
aahmed-spec Jan 7, 2026
1d168ed
Update src/powershell/tests/Test-Assessment.25395.ps1
aahmed-spec Jan 7, 2026
003cabc
Update src/powershell/tests/Test-Assessment.25395.ps1
aahmed-spec Jan 7, 2026
b0e888d
Update src/powershell/tests/Test-Assessment.25395.ps1
aahmed-spec Jan 7, 2026
a621f44
"url" capitalized as "URL"
sandeepjha000 Jan 7, 2026
802dfa6
corrected grammar
sandeepjha000 Jan 7, 2026
1ea5d16
simplified priority check
sandeepjha000 Jan 7, 2026
e8203c6
Merge branch 'feature-25408' of https://github.com/microsoft/zerotrus…
sandeepjha000 Jan 7, 2026
da4d1fd
Added comments for Test-IsBroadCidr function
aahmed-spec Jan 8, 2026
cc80027
Added BroadPortRangeThreshold variable for src/powershell/tests/Test-…
aahmed-spec Jan 8, 2026
6244d6b
Update line no: 69 src/powershell/tests/Test-Assessment.25395.ps1
aahmed-spec Jan 8, 2026
0349d5a
Initial plan
Copilot Jan 8, 2026
6b15741
Fix off-by-one errors in IP and port range calculations
Copilot Jan 8, 2026
f4bb78f
Merge pull request #754 from microsoft/copilot/sub-pr-747-another-one
aahmed-spec Jan 8, 2026
c160132
fix invetigate status and md file
komalp2025 Jan 8, 2026
3e80636
Merge pull request #750 from microsoft/feature-25408
SagarSathe Jan 8, 2026
184a79c
Update test logic for assessment 25395
aahmed-spec Jan 8, 2026
c1fdf84
Refine segment evaluation logic for assessment 25395
aahmed-spec Jan 8, 2026
0cfa271
updated test
ashwinikarke Jan 8, 2026
3535ca1
taken pull
ashwinikarke Jan 8, 2026
8c9c78d
add test 35030
komalp2025 Jan 8, 2026
20d428a
Refine segment scope column logic for assessment 25395
aahmed-spec Jan 8, 2026
5349e01
remove duplicate link
komalp2025 Jan 8, 2026
3164c97
Fix formatting of DLP policy links in Test-Assessment.35030.md
alexandair Jan 8, 2026
e65ba67
Update DLP policy title and optimize enabled policies count query
alexandair Jan 8, 2026
8f8a6f6
added test
ashwinikarke Jan 9, 2026
21d7674
Merge pull request #756 from microsoft/Data-35030-DLP-Policies-Cloud-…
SagarSathe Jan 9, 2026
1685849
updated test
ashwinikarke Jan 9, 2026
5c8ab65
taken pull
ashwinikarke Jan 9, 2026
a4a0ce7
Merge pull request #747 from microsoft/test-25395
SagarSathe Jan 9, 2026
92428bc
added portal link
ashwinikarke Jan 9, 2026
a020439
taken pull
ashwinikarke Jan 9, 2026
961251f
fixed Copilot PR comments
ashwinikarke Jan 9, 2026
9a536c2
draft 35031
komalp2025 Jan 12, 2026
4fcf99f
integrate Find-ZtProfileLinkedToPolicy
komalp2025 Jan 12, 2026
b841097
Revert draft 35031
komalp2025 Jan 12, 2026
5775669
updated portal link
ashwinikarke Jan 12, 2026
6fdd459
Add Find-ZtProfilesLinkedToPolicy function to evaluate linked filteri…
alexandair Jan 12, 2026
aababe0
Merge pull request #765 from microsoft/add-ZTProfilesLinkedToPolicy-2…
SagarSathe Jan 12, 2026
190ffc4
Merge pull request #763 from microsoft/Feature-35025
SagarSathe Jan 12, 2026
7258fa5
Merge pull request #767 from alexandair/alex-Find-ZtProfilesLinkedToP…
alexandair Jan 12, 2026
6f0b0f8
add support for AIPService
komalp2025 Jan 7, 2026
d313f25
add md file
komalp2025 Jan 7, 2026
929c481
fix invetigate status and md file
komalp2025 Jan 8, 2026
838ac69
Merge branch 'Data-35011-Super-User-Membership-Configuration' of http…
komalp2025 Jan 13, 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
44 changes: 42 additions & 2 deletions src/powershell/public/Connect-ZtAssessment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
$SkipAzureConnection,

# The services to connect to such as Azure and ExchangeOnline. Default is Graph.
[ValidateSet('All', 'Azure', 'ExchangeOnline', 'Graph', 'SecurityCompliance', 'SharePointOnline')]
[ValidateSet('All', 'Azure', 'AipService', 'ExchangeOnline', 'Graph', 'SecurityCompliance', 'SharePointOnline')]
[string[]]$Service = 'Graph',

# The Exchange environment to connect to. Default is O365Default. Supported values include O365China, O365Default, O365GermanyCloud, O365USGovDoD, O365USGovGCCHigh.
Expand Down Expand Up @@ -117,7 +117,7 @@
}


$OrderedImport = Get-ModuleImportOrder -Name @('Az.Accounts', 'ExchangeOnlineManagement', 'Microsoft.Graph.Authentication', 'Microsoft.Online.SharePoint.PowerShell')
$OrderedImport = Get-ModuleImportOrder -Name @('Az.Accounts', 'ExchangeOnlineManagement', 'Microsoft.Graph.Authentication', 'Microsoft.Online.SharePoint.PowerShell', 'AipService')

Write-Verbose "Import Order: $($OrderedImport.Name -join ', ')"

Expand Down Expand Up @@ -348,6 +348,32 @@
}
}
}

'AipService' {
if ($Service -contains 'AipService' -or $Service -contains 'All') {
try {
# Import module with compatibility if needed
if ($PSVersionTable.PSEdition -ne 'Desktop') {
# Assume module is installed in Windows PowerShell as per instructions
Import-Module AipService -UseWindowsPowerShell -WarningAction SilentlyContinue -ErrorAction Stop -Global
}
else {
Import-Module AipService -ErrorAction Stop -Global
}
}
catch {
# Provide clearer guidance when import fails, especially under PowerShell Core
if ($PSVersionTable.PSEdition -ne 'Desktop') {
$message = "Failed to import AipService module. When running in PowerShell Core, 'AipService' must be installed in Windows PowerShell 5.1 (Desktop) for -UseWindowsPowerShell to work. Underlying error: $_"
}
else {
$message = "Failed to import AipService module: $_"
}
Write-Host "`n$message" -ForegroundColor Red
Write-PSFMessage $message -Level Error
}
}
}
}

if ($Service -contains 'SharePointOnline' -or $Service -contains 'All') {
Expand Down Expand Up @@ -388,4 +414,18 @@
}
}
}

if ($Service -contains 'AipService' -or $Service -contains 'All') {
Write-Host "`nConnecting to Azure Information Protection" -ForegroundColor Yellow
Write-PSFMessage 'Connecting to Azure Information Protection'

try {
Connect-AipService -ErrorAction Stop
Write-Verbose "Successfully connected to Azure Information Protection."
}
catch {
Write-Host "`nFailed to connect to Azure Information Protection: $_" -ForegroundColor Red
Write-PSFMessage "Failed to connect to Azure Information Protection: $_" -Level Error
}
}
}
27 changes: 27 additions & 0 deletions src/powershell/tests/Test-Assessment.35011.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
The super user feature in Azure Information Protection grants designated accounts the ability to decrypt all content protected by the organization's Rights Management service, regardless of the encryption permissions originally assigned. Super users can access encrypted documents even when they are not explicitly granted permissions by the content owner, enabling scenarios such as eDiscovery, data recovery, compliance investigations, and migration from encrypted content.

Without super user configuration, organizations risk data loss when encryption keys become inaccessible, employees leave without transferring ownership of critical encrypted files, or legal holds require access to protected content where the original rights holders cannot be reached. The super user feature must be explicitly enabled and membership must be carefully controlled—typically limited to service accounts used by compliance tools, backup systems, or eDiscovery platforms rather than individual user accounts. Failure to configure super users creates operational risk where encrypted content becomes permanently inaccessible, while overly broad super user membership creates security risk where unauthorized accounts gain unrestricted access to all protected content.

**Remediation action**

To configure super users:

Connect to Azure Information Protection PowerShell: Connect-AipService
Enable the super user feature: Enable-AipServiceSuperUserFeature
Add super users (service accounts recommended):
For user accounts: Add-AipServiceSuperUser -EmailAddress "[email protected]"
For service principals: Add-AipServiceSuperUser -ServicePrincipalId "service-principal-id"
Verify configuration: Get-AipServiceSuperUser

Best practices:

- Limit super user membership to dedicated service accounts
- Use service principals for automated tools (eDiscovery, backup)
- Avoid assigning super user to individual employee accounts
- Audit super user access regularly
- Document business justification for each super user account

[Configure super users for Azure Information Protection Enable-AipServiceSuperUserFeature Add-AipServiceSuperUser](https://learn.microsoft.com/en-us/powershell/module/aipservice/enable-aipservicesuperuserfeature)

<!--- Results --->
%TestResult%
144 changes: 144 additions & 0 deletions src/powershell/tests/Test-Assessment.35011.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<#
.SYNOPSIS
Azure Information Protection (AIP) Super User Feature Configuration

.DESCRIPTION
Evaluates whether the Azure Information Protection (AIP) super user feature is enabled and properly configured with designated super users. The super user feature allows specified service accounts or administrators to decrypt rights-managed content for auditing, search, and compliance purposes.

The cmdlets require the AipService module (v3.0+) which is only supported on Windows PowerShell 5.1. A PowerShell 7 subprocess workaround is automatically employed if running under PowerShell Core.

.NOTES
Test ID: 35011
Pillar: Data
Risk Level: High
#>

function Test-Assessment-35011 {
[ZtTest(
Category = 'Azure Information Protection',
ImplementationCost = 'Medium',
MinimumLicense = ('Microsoft 365 E5'),
Pillar = 'Data',
RiskLevel = 'High',
SfiPillar = '',
TenantType = ('Workforce','External'),
TestId = 35011,
Title = 'Azure Information Protection (AIP) Super User Feature',
UserImpact = 'Low'
)]
[CmdletBinding()]
param()

#region Data Collection
Write-PSFMessage '🟦 Start' -Tag Test -Level VeryVerbose

$activity = 'Checking Azure Information Protection Super User Configuration'
Write-ZtProgress -Activity $activity -Status 'Querying AIP super user settings'

$superUserFeatureEnabled = $null
$superUsers = @()
$errorMsg = $null

try {
# Note: AipService must be authenticated in Connect-ZtAssessment first
# This test only performs queries against the authenticated service

# Query Q1: Check if super user feature is enabled
$superUserFeatureEnabled = Get-AipServiceSuperUserFeature -ErrorAction Stop

# Query Q2: Get list of configured super users
$superUsers = Get-AipServiceSuperUser -ErrorAction Stop
}
catch {
$errorMsg = $_
Write-PSFMessage "Error querying AIP Super User configuration: $_" -Level Error
}
#endregion Data Collection

#region Assessment Logic
$passed = $false
$investigateFlag = $false

if ($errorMsg) {
$investigateFlag = $true
}
else {
# Evaluation logic:
# 1. If feature is disabled, test fails
if ($superUserFeatureEnabled -eq $false) {
$passed = $false
}
# 2. If feature is enabled, check if at least one super user is configured
elseif ($superUserFeatureEnabled -eq $true) {
$superUserCount = if ($superUsers) { @($superUsers).Count } else { 0 }

if ($superUserCount -ge 1) {
$passed = $true
}
else {
$passed = $false
}
}
}
#endregion Assessment Logic

#region Report Generation
$testResultMarkdown = ""

if ($investigateFlag) {
$testResultMarkdown = "⚠️ Unable to determine AIP super user configuration due to permissions or connection issues.`n`n"
$testResultMarkdown += "**Error Details:**`n"
$testResultMarkdown += "* $errorMsg`n`n"
$testResultMarkdown += "**Possible Causes:**`n"
$testResultMarkdown += "* AipService module not installed (requires v3.0+)`n"
$testResultMarkdown += "* Not connected to AIP service`n"
$testResultMarkdown += "* Insufficient permissions to query AIP configuration`n"
}
else {
if ($passed) {
$testResultMarkdown = "✅ Super user feature is enabled with at least one member configured.`n`n"
}
else {
if ($superUserFeatureEnabled -eq $true) {
$testResultMarkdown = "❌ Super user feature is enabled BUT no members are configured.`n`n"
}
else {
$testResultMarkdown = "❌ Super user feature is DISABLED.`n`n"
}
}

$testResultMarkdown += "### Azure Information Protection Super User Configuration`n`n"
$testResultMarkdown += "**Feature Status:**`n"

$featureStatus = if ($superUserFeatureEnabled) { "Enabled" } else { "Disabled" }
$testResultMarkdown += "* Super User Feature: $featureStatus`n`n"

if ($superUserFeatureEnabled) {
$superUserCount = if ($superUsers) { @($superUsers).Count } else { 0 }
$testResultMarkdown += "**Super Users Configured: $superUserCount**`n`n"

if ($superUserCount -gt 0) {
$testResultMarkdown += "| Email Address / Service Principal ID | Account Type |`n"
$testResultMarkdown += "| :--- | :--- |`n"

foreach ($superUser in $superUsers) {
$accountType = if ($superUser -like '*-*-*-*-*') { "Service Principal" } else { "User" }
$testResultMarkdown += "| $superUser | $accountType |`n"
}

$testResultMarkdown += "`n"
}
}

$testResultMarkdown += "**Note:** Super user configuration is not available through the Azure portal and must be managed via PowerShell using the AipService module.`n"
}
#endregion Report Generation

$testResultDetail = @{
TestId = '35011'
Title = 'Azure Information Protection (AIP) Super User Feature'
Status = $passed
Result = $testResultMarkdown
}
Add-ZtTestResultDetail @testResultDetail
}