Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] CISA checks are skipped due to license, but the skipped reason disappears #435

Open
Oppedijk opened this issue Aug 28, 2024 · 5 comments

Comments

@Oppedijk
Copy link
Contributor

For instance in: powershell/public/cisa/entra/Test-MtCisaPermanentRoleAssignment.ps1

  $EntraIDPlan = Get-MtLicenseInformation -Product EntraID
    $pim = $EntraIDPlan -eq "P2" -or $EntraIDPlan -eq "Governance"
    if(-not $pim){
        Add-MtTestResultDetail -SkippedBecause NotLicensedEntraIDP2
        return $null
    }

The return null delivers no object, and then the ResultsInfoDialog.jsx will just return this:

if (props.Item.Result === "Skipped") {
        return "Test skipped.";
      }

And not display the reason that there was a license not available.

@soulemike
Copy link
Contributor

I know I have seen this with a skip, but I couldn't recreate it this evening on 0.3.9. I was able to cause a similar issue I believe for a failed result though. What was your scenario to recreate the skipped issue @Oppedijk?

Here is with a licensed tenant, but not connected to Graph.
image

Here is with an unlicensed tenant and connected to Graph.
image

@soulemike
Copy link
Contributor

Hey @Oppedijk, have you seen this on current main or preview releases? Thanks!

@Oppedijk
Copy link
Contributor Author

@Snozzberries That was on the current main, I had some issues with the preview release that other things didn't work.

@magnusjak
Copy link

magnusjak commented Sep 19, 2024

EDIT: I see that this has been fixed in the preview version, so thanks!

I have a similar issue with the MS.AAD.7.x tests. I know this is because I don't have the correct permissions consented to for this specific test, but it should still show this as the skipped reason.
image

It seems that this test is skipped in the .tests.ps1 file already, and not in the Test function. Not similar to other tests. So I'm not sure how to fix this myself.

@soulemike
Copy link
Contributor

Thanks @magnusjak this looks like it may be related to Add-MtTestResultDetail not having the NotConnectedGraph option for the SkippedBecause parameter though it is available in the Get-MtSkippedReason logic.

Refs

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

No branches or pull requests

3 participants