Skip to content

Conversation

@alexandair
Copy link
Collaborator

Copy link
Contributor

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 (ID: 35007) to check if legacy Information Rights Management (IRM) is enabled in SharePoint Online. The test identifies organizations still using the deprecated IRM feature and recommends migrating to modern sensitivity labels.

  • Implements test logic to query SharePoint tenant IRM settings via Get-SPOTenant
  • Provides remediation guidance for disabling IRM and migrating to modern sensitivity labels
  • Includes comprehensive unit tests covering pass, fail, and error scenarios

Reviewed changes

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

File Description
src/powershell/tests/Test-Assessment.35007.ps1 Main assessment function that checks IRM status and generates test results
src/powershell/tests/Test-Assessment.35007.md Documentation with remediation steps and migration guidance to sensitivity labels
code-tests/test-assessments/Test-Assessment.35007.Tests.ps1 Pester unit tests covering IRM enabled, disabled, and error scenarios

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

capabilitiy  --> capability

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings January 4, 2026 10:31
Permisionss --> Permissions

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


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

Copilot AI review requested due to automatic review settings January 4, 2026 10:57
Copy link
Contributor

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

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


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

$passed = $false
}
else {
$passed = $null -ne $spoTenant -and $spoTenant.IrmEnabled -eq $true
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

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

The assessment logic is inverted. When IrmEnabled is true, the test should fail (not pass) because the legacy IRM feature being enabled is the problem. Currently, line 54 sets $passed = $true when IrmEnabled is true, but based on the test description and report messages (lines 65-68), IRM being enabled should result in a failed test. The condition should be: $passed = $null -ne $spoTenant -and $spoTenant.IrmEnabled -eq $false

Suggested change
$passed = $null -ne $spoTenant -and $spoTenant.IrmEnabled -eq $true
$passed = $null -ne $spoTenant -and $spoTenant.IrmEnabled -eq $false

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,18 @@
Information Rights Management (IRM) integration in SharePoint Online libraries is a legacy feature that has been replaced by Enhanced SharePoint Permissions (ESP). Any library using this legacy capability should be flagged to move to newer capabilities.
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

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

There's a spelling error in the word "capability" which is misspelled as "capabilitiy" (missing 'l').

Copilot uses AI. Check for mistakes.
Pass Condition: Returns `$false` or `$null` (not configured

```powershell
        $passed = $null -ne $spoTenant -and $spoTenant.IrmEnabled -ne $true
```
Copy link
Collaborator

@SagarSathe SagarSathe left a comment

Choose a reason for hiding this comment

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

LGTM

@SagarSathe SagarSathe merged commit fbf8aec into microsoft:main Jan 6, 2026
2 checks passed
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.

2 participants