maester icon indicating copy to clipboard operation
maester copied to clipboard

Test-MtCisaUnmanagedRoleAssignment includes %TestResult% in result

Open merill opened this issue 5 months ago • 0 comments

Describe the bug

This is a follow up on #1032.

The root cause is the %TestResult% is not being replaced with the list of assignments that don't have a start date.

I took a quick look the code doesn't currently create a clear list of the assignments with the start date. We need to improve it so it can provide the names of the assignments and deep link into the portal so it can be fixed.

    if ($testResult) {
        $testResultMarkdown = "Well done. Your tenant has no unmanaged active role assignments."
    } else {
        $testResultMarkdown = "Your tenant has active assignments without a start date:`n`n%TestResult%"
    }
    Add-MtTestResultDetail -Result $testResultMarkdown

merill avatar Jul 20 '25 22:07 merill