Azure AD Enterprise application Report

Landrover 20 Reputation points
2023-06-07T08:44:18.81+00:00

Hi

I'm trying to generate an AAD enterprise apps report that includes owners of each apps.But the report generated only includes the App ID & display name,The owner column is empty.Attached is the script.What am i missing?

MS Script.txt

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

Accepted answer
  1. Harpreet Singh Matharoo 8,396 Reputation points Microsoft Employee Moderator
    2023-06-07T10:20:39.19+00:00

    Hello @Landrover ,

    Thank you for reaching out. I would request you to please try and use MgGraph Command: Get-MgServicePrincipalOwner. I have created a sample script with output which you can use as a base and modify for a more specific data.

    Connect-MgGraph
    Select-MgProfile -Name beta
    $servicePrincipals = Get-MgServicePrincipal -All 
    foreach ($App in $servicePrincipals)
    {
    Get-MgServicePrincipalOwner -ServicePrincipalId $App.Id | Select-Object @{N='ServicePrincipalId';E={$App.Id}}, @{N='ServicePrincipalDisplayName';E={$App.AppDisplayName}}, @{N='OwnerObjectID';E={$_.Id}}, @{N='OwnerDisplayName';E={$_.AdditionalProperties.displayName}}
    }
    

    Screenshot of the Output:

    User's image

    I hope this helps to resolve your query. Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.