Hello @Girish Prajwal , thank you for reaching out. You can use the following PS script to pull out the details of the assigned users or groups to an Application registered in AAD.
Connect-AzureAD
$PathCsv = "C:\temp\EnterpriseApplicationReport.csv"
$ServicePrincipalList = Get-AzureADServicePrincipal -All $true
foreach($servicePrincipal in $ServicePrincipalList){
Get-AzureADServiceAppRoleAssignment -ObjectId $ServicePrincipal.objectId | Select-Object ResourceDisplayName, ResourceId, PrincipalDisplayName, PrincipalType | Export-Csv -Path $PathCsv -NoTypeInformation -Append
}
Hope this helps.
Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as an Answer; if the above response helped in answering your query.