Public/Risk/Get-SCARiskDiscoverySummary.ps1

function Get-SCARiskDiscoverySummary {
    <#
    .SYNOPSIS
        Gets a summary of discovered accounts and their standing-privilege risk.
    .DESCRIPTION
        Calls GET /risk-posture/secure-standing-privilege/discovery on the Risk Management API.
        Values are returned exactly as CyberArk computes them; psSCA does not calculate its own
        risk scores.
    .PARAMETER Session
        A psSCA.Session object or session name. Defaults to the current default session.
    .EXAMPLE
        Get-SCARiskDiscoverySummary

        Returns the tenant's discovered-accounts risk summary.
    .INPUTS
        None.
    .OUTPUTS
        psSCA.RiskAccountsSummary
    .LINK
        https://api-docs.cyberark.com/risk-management-api/docs/risk-management-api
    #>

    [CmdletBinding()]
    [OutputType('psSCA.RiskAccountsSummary')]
    param(
        [Parameter()]
        [object]$Session
    )

    Invoke-SCARequest -Session $Session -Service 'Compass' -Method GET -Path '/risk-posture/secure-standing-privilege/discovery' `
        -Operation 'Get-SCARiskDiscoverySummary' -TypeName 'psSCA.RiskAccountsSummary'
}