Skip to content

Conversation

@alexandair
Copy link
Collaborator

Copilot AI review requested due to automatic review settings December 22, 2025 21:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new assessment test (35002) to check if Microsoft Rights Management Services (RMS) is properly allowed in Cross-Tenant Access Policies (XTAP). The test ensures that RMS (App ID: 00000012-0000-0000-c000-000000000000) is not blocked in both inbound and outbound B2B collaboration settings, which is critical for enabling encrypted content sharing across organizational boundaries.

Key Changes

  • Adds a new PowerShell test function that validates XTAP settings for RMS application access
  • Implements logic to check both default policies and partner-specific policy overrides
  • Includes comprehensive unit tests covering various scenarios (allowed, blocked, inherited settings)

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
src/powershell/tests/Test-Assessment.35002.ps1 Implements the main assessment test logic with helper functions to evaluate RMS access status in XTAP settings
src/powershell/tests/Test-Assessment.35002.md Provides documentation explaining the test purpose, risks, and remediation steps for configuring XTAP RMS settings
code-tests/test-assessments/Test-Assessment.35002.Tests.ps1 Contains comprehensive unit tests covering multiple scenarios including explicit/implicit allow/block conditions and error handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

It "Should pass when Inbound and Outbound Block specific apps but NOT RMS (Implicit Allow)" {
$script:defaultPolicyResponse = [PSCustomObject]@{
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation: the variable assignment uses extra leading spaces (6 spaces instead of the standard 12 spaces for this level). This should be aligned with the indentation used in other test cases in this file.

Copilot uses AI. Check for mistakes.
}

It "Should ignore inherited partner settings" {
$script:defaultPolicyResponse = [PSCustomObject]@{
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation: the variable assignment uses extra leading spaces (6 spaces instead of the standard 12 spaces for this level). This should be aligned with the indentation used in other test cases in this file.

Suggested change
$script:defaultPolicyResponse = [PSCustomObject]@{
$script:defaultPolicyResponse = [PSCustomObject]@{

Copilot uses AI. Check for mistakes.
[ZtTest(
Category = 'Entra',
ImplementationCost = 'Low',
MinimumLicense = ('MIP_P2'),
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MinimumLicense value 'MIP_P2' is not a valid license type supported by the Get-ZtLicense function. The function only accepts 'EntraIDP1', 'EntraIDP2', 'EntraIDGovernance', 'EntraWorkloadID', or 'Intune'. This needs to be changed to a valid license type that corresponds to Microsoft Information Protection capabilities, which would likely be 'EntraIDP2' or another existing license type that includes MIP features.

Suggested change
MinimumLicense = ('MIP_P2'),
MinimumLicense = ('EntraIDP2'),

Copilot uses AI. Check for mistakes.

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

Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test implementation is missing the license check that other similar tests include. After line 76, there should be a license validation block that checks if the tenant has the required license and returns early if not, similar to how other P2 tests handle this. For example, this test should include something like: if ( -not (Get-ZtLicense EntraIDP2) ) { Add-ZtTestResultDetail -SkippedBecause NotLicensedEntraIDP2; return }

Suggested change
if (-not (Get-ZtLicense MIPP2)) {
Add-ZtTestResultDetail -SkippedBecause NotLicensedMIPP2
return
}

Copilot uses AI. Check for mistakes.
}

It "Should pass when Inbound and Outbound allow All Apps" {
$script:defaultPolicyResponse = [PSCustomObject]@{
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation: the variable assignment uses extra leading spaces (6 spaces instead of the standard 12 spaces for this level). This should be aligned with the indentation used in other test cases in this file.

Suggested change
$script:defaultPolicyResponse = [PSCustomObject]@{
$script:defaultPolicyResponse = [PSCustomObject]@{

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant