How to export assigned users from an Azure Enterprise Application

Platt, Cory R 20 Reputation points
2023-10-11T19:20:22.6966667+00:00

I followed the steps in this article:

https://learn.microsoft.com/en-us/answers/questions/133986/how-to-export-users-from-azure-enterprise-applicat?source=docs

However it only shows me the first 100 or so users for each application. I have far more than that in some applications, and am trying to figure out how to get a list of all of them in a particular application. Is there anything you can do in powershell to provide a full list of everyone in a particular app? Here is the exact command I was running (minus the actual object ID.

Connect-AzureAD  
  
Get-AzureADServiceAppRoleAssignment -ObjectId Object ID Here | Select-Object PrincipalDisplayName, PrincipalType | Export-Csv -Path C:\temp\test3.csv 

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,629 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andy David - MVP 145.6K Reputation points MVP
    2023-10-11T20:30:26.6566667+00:00

    Add the -all switch:

    https://learn.microsoft.com/en-us/powershell/module/azuread/get-azureadserviceapproleassignment?view=azureadps-2.0

    Migrate to the PS MgGraph as well :)

    [https://stackoverflow.com/questions/74307200/microsoft-graph-to-list-users-assigned-to-app](https://stackoverflow.com/questions/74307200/microsoft-graph-to-list-users-assigned-to-app)
    
    $Assignees = Get-MgServicePrincipalAppRoleAssignedTo -ServicePrincipalId [objectIdServicePrincipal] -all
    
    
    
    0 comments No comments

0 additional answers

Sort by: Most helpful