How to expand PowerShell MS Graph Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject Microsoft.Graph.PowerShell.Models.MicrosoftGraphVerifiedPublisher?

EnterpriseArchitect 4,936 Reputation points
2024-06-19T11:15:12.33+00:00

Using PowerShell for Microsoft Graphs, how can I expand or convert the below attributes or columns?

CreatedOnBehalfOf : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject 
VerifiedPublisher : Microsoft.Graph.PowerShell.Models.MicrosoftGraphVerifiedPublisher

Script:

$Properties = 'Id', 'AppId', 'DisplayName', 'Description', 'Notes', 'Owners', 'CreatedDateTime', 'CreatedOnBehalfOf', 'PublisherDomain', 'VerifiedPublisher', 'SignInAudience', 'AppRoles'
$paramGetMgApplication = @{
  All              = $true
  Filter           = "*"
  Property         = $Properties
  ConsistencyLevel = 'Eventual'
  CountVariable    = 'CountVar'
}
Get-MgApplication @paramGetMgApplication |
Select-Object $Properties,     
    @{n="CreatedID";e = {$_.CreatedOnBehalfOf}}, 
    @{n="PublisherId"; e = {$_.VerifiedPublisher}}

Thanks,

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,112 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,234 questions
Microsoft Entra
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,166 questions
0 comments No comments
{count} votes