maester
maester copied to clipboard
Test-MtCisaUnmanagedRoleAssignment includes %TestResult% in result
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