Get-TenantGraphDetails
PowerApps: Retrieves tenant graph details
#Requires -Version 5.1
#Requires -Modules Microsoft.PowerApps.PowerShell
[CmdletBinding()]
Param(
[Parameter(Mandatory = $true)]
[pscredential]$PACredential,
[string]$GraphApiVersion
)
Process {
try {
ConnectPowerApps4Creators -PAFCredential $PACredential
$getArgs = @{ ErrorAction = 'Stop' }
if ($PSBoundParameters.ContainsKey('GraphApiVersion')) { $getArgs.Add('GraphApiVersion', $GraphApiVersion) }
$result = Get-TenantDetailsFromGraph @getArgs -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 { DisconnectPowerApps4Creators }
}PowerApps credentials for authentication
The Graph API version to call