Private/Assert-NSPConditionalAccessDashboardReady.ps1

function Assert-NSPConditionalAccessDashboardReady {
    <#
    .SYNOPSIS
        Dashboard: stops an action that needs a tenant profile or a saved inventory, saying where to get it.
    #>

    [CmdletBinding()]
    param(
        [Parameter(Mandatory)]$Session,
        [switch]$Inventory,
        [switch]$TenantProfile
    )
    if ($TenantProfile -and -not $Session.State.ProfilePath) { throw 'No tenant profile yet. Press N to set up a tenant, or All tools > Tenant profile > Build the profile.' }
    if ($Inventory -and -not $Session.State.Inventory) { throw 'No saved inventory yet. Sign in (C) and the dashboard takes one, or press I.' }
}