Skip to content

Get-MgmtGraphUserInferenceClassification

MgmtGraph: Audits user inference classification (Focused Inbox)

#Requires -Version 5.1
#Requires -Modules Microsoft.Graph.Mail

[CmdletBinding()]
Param (
    [Parameter(Mandatory = $true, Position = 0)]
    [string]$Identity
)

Process {
    try {
        $classification = Get-MgUserInferenceClassification -UserId $Identity -ErrorAction Stop
        
        $result = [PSCustomObject]@{
            UserId    = $Identity
            Id        = $classification.Id
            Timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
        }

        Write-Output $result
    }
    catch {
        throw
    }
}

Specifies the UserPrincipalName or ID of the user.

An interactive directory of PowerShell scripts.