If you are licensed for Remediations (formerly Proactive Remediations) in Intune you can run a detection script to gather the data you are looking for and once collected you can download the report and filter through it. If you are looking to disable enabled guest accounts, you can modify this to fail if in an enabled state and create a remediation script to disable guest accounts. Otherwise you can just use something like this example below for detection only.
https://learn.microsoft.com/en-us/mem/intune/fundamentals/remediations
$ReportingDetails = @()
# Get Guest group members
$LocalGuestUsers = Get-LocalGroup -SID S-1-5-32-546 | Get-LocalGroupMember
# Get Guest user details
foreach ($LocalGuestUser in $LocalGuestUsers) {
# Get user details
$UserDetails = Get-LocalUser -SID $LocalGuestUser.SID
# Build user report details
$ReportingDetails += "User: $($UserDetails.Name) Enabled: $($UserDetails.Enabled)"
}
# Write PAR Report
Write-Output -InputObject ($ReportingDetails -join ', ')
Exit 0