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

EnterpriseArchitect 5,316 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,767 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,442 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.
21,239 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.