@php use App\Models\Tenant; use App\Support\Badges\BadgeDomain; use App\Support\Badges\BadgeRenderer; use App\Support\Links\RequiredPermissionsLinks; $tenant = Tenant::current(); $vm = is_array($viewModel ?? null) ? $viewModel : []; $overview = is_array($vm['overview'] ?? null) ? $vm['overview'] : []; $counts = is_array($overview['counts'] ?? null) ? $overview['counts'] : []; $featureImpacts = is_array($overview['feature_impacts'] ?? null) ? $overview['feature_impacts'] : []; $filters = is_array($vm['filters'] ?? null) ? $vm['filters'] : []; $selectedFeatures = is_array($filters['features'] ?? null) ? $filters['features'] : []; $selectedStatus = (string) ($filters['status'] ?? 'missing'); $selectedType = (string) ($filters['type'] ?? 'all'); $searchTerm = (string) ($filters['search'] ?? ''); $featureOptions = collect($featureImpacts) ->filter(fn (mixed $impact): bool => is_array($impact) && is_string($impact['feature'] ?? null)) ->map(fn (array $impact): string => (string) $impact['feature']) ->filter() ->unique() ->sort() ->values() ->all(); $permissions = is_array($vm['permissions'] ?? null) ? $vm['permissions'] : []; $overall = $overview['overall'] ?? null; $overallSpec = $overall !== null ? BadgeRenderer::spec(BadgeDomain::VerificationReportOverall, $overall) : null; $copy = is_array($vm['copy'] ?? null) ? $vm['copy'] : []; $copyApplication = (string) ($copy['application'] ?? ''); $copyDelegated = (string) ($copy['delegated'] ?? ''); $missingApplication = (int) ($counts['missing_application'] ?? 0); $missingDelegated = (int) ($counts['missing_delegated'] ?? 0); $presentCount = (int) ($counts['present'] ?? 0); $errorCount = (int) ($counts['error'] ?? 0); $missingTotal = $missingApplication + $missingDelegated + $errorCount; $requiredTotal = $missingTotal + $presentCount; $adminConsentUrl = $tenant ? RequiredPermissionsLinks::adminConsentUrl($tenant) : null; $adminConsentPrimaryUrl = $tenant ? RequiredPermissionsLinks::adminConsentPrimaryUrl($tenant) : RequiredPermissionsLinks::adminConsentGuideUrl(); $adminConsentLabel = $adminConsentUrl ? 'Open admin consent' : 'Admin consent guide'; $reRunUrl = $this->reRunVerificationUrl(); @endphp
Review what’s missing for this tenant and copy the missing permissions for admin consent.
@if ($overallSpec) {{ $overallSpec->label }} @endif
Missing (app)
{{ (int) ($counts['missing_application'] ?? 0) }}
Missing (delegated)
{{ (int) ($counts['missing_delegated'] ?? 0) }}
Present
{{ (int) ($counts['present'] ?? 0) }}
Errors
{{ (int) ($counts['error'] ?? 0) }}
Guidance
Who can fix this? Global Administrator / Privileged Role Administrator.
Primary next step: {{ $adminConsentLabel }}
@if ($reRunUrl)
After granting consent: Re-run verification
@endif
Copy missing application permissions Copy missing delegated permissions
@if (is_array($featureImpacts) && $featureImpacts !== [])
@foreach ($featureImpacts as $impact) @php $featureKey = is_array($impact) ? ($impact['feature'] ?? null) : null; $featureKey = is_string($featureKey) ? $featureKey : null; $missingCount = is_array($impact) ? (int) ($impact['missing'] ?? 0) : 0; $isBlocked = is_array($impact) ? (bool) ($impact['blocked'] ?? false) : false; if ($featureKey === null) { continue; } $selected = in_array($featureKey, $selectedFeatures, true); @endphp @endforeach
@if ($selectedFeatures !== [])
Clear feature filter
@endif @endif
Missing application permissions
Newline-separated list for admin consent.
Close
@if ($copyApplication === '')
Nothing to copy — no missing application permissions in the current feature filter.
@else
Copied Copy

                                
@endif
Missing delegated permissions
Newline-separated list for delegated consent.
Close
@if ($copyDelegated === '')
Nothing to copy — no missing delegated permissions in the current feature filter.
@else
Copied Copy

                                
@endif
@if (! $tenant)
No tenant selected.
@else
Filters
Search doesn’t affect copy actions. Feature filters do.
Reset
@if ($featureOptions !== [])
@endif
@if ($requiredTotal === 0)
No permissions configured
No required permissions are currently configured in config/intune_permissions.php.
@elseif ($permissions === [])
@if ($selectedStatus === 'missing' && $missingTotal === 0 && $selectedType === 'all' && $selectedFeatures === [] && trim($searchTerm) === '')
All required permissions are present
Switch Status to “All” if you want to review the full matrix.
@else
No matches
No permissions match the current filters.
@endif
@else @php $featuresToRender = $featureImpacts; if ($selectedFeatures !== []) { $featuresToRender = collect($featureImpacts) ->filter(fn ($impact) => is_array($impact) && in_array((string) ($impact['feature'] ?? ''), $selectedFeatures, true)) ->values() ->all(); } @endphp @foreach ($featuresToRender as $impact) @php $featureKey = is_array($impact) ? ($impact['feature'] ?? null) : null; $featureKey = is_string($featureKey) ? $featureKey : null; if ($featureKey === null) { continue; } $rows = collect($permissions) ->filter(fn ($row) => is_array($row) && in_array($featureKey, (array) ($row['features'] ?? []), true)) ->values() ->all(); if ($rows === []) { continue; } @endphp
{{ $featureKey }}
@foreach ($rows as $row) @php $key = is_array($row) ? (string) ($row['key'] ?? '') : ''; $type = is_array($row) ? (string) ($row['type'] ?? '') : ''; $status = is_array($row) ? (string) ($row['status'] ?? '') : ''; $description = is_array($row) ? ($row['description'] ?? null) : null; $description = is_string($description) ? $description : null; $statusSpec = BadgeRenderer::spec(BadgeDomain::TenantPermissionStatus, $status); @endphp @endforeach
Permission Type Status
{{ $key }}
@if ($description)
{{ $description }}
@endif
{{ $type === 'delegated' ? 'Delegated' : 'Application' }} {{ $statusSpec->label }}
@endforeach @endif
@endif