Skip to content

Get-TenantGraphDetails-Admin

PowerApps Admin: Retrieves tenant graph details

#Requires -Version 5.1
#Requires -Modules Microsoft.PowerApps.Administration.PowerShell

[CmdletBinding()]
Param(
    [Parameter(Mandatory = $true)]
    [pscredential]$PACredential,

    [string]$GraphApiVersion
)

Process {
    try {
        ConnectPowerApps -PAFCredential $PACredential
        $args = @{ ErrorAction = 'Stop' }
        if ($PSBoundParameters.ContainsKey('GraphApiVersion')) { $args.Add('GraphApiVersion', $GraphApiVersion) }
        $result = Get-TenantDetailsFromGraph @args -ErrorAction Stop | Select-Object *
        if ($null -ne $result) { foreach ($item in $result) { $item | Add-Member -NotePropertyName Timestamp -NotePropertyValue (Get-Date -Format "yyyy-MM-dd HH:mm:ss") -PassThru -Force } }
    }
    catch { throw }
    finally { DisconnectPowerApps }
}

PowerApps credentials for authentication

The Graph API version to call

An interactive directory of PowerShell scripts.