A cloud-based identity and access management service for securing user authentication and resource access
@j prasad Thanks for posting your question in Microsoft Q&A.
Based on your requirement we have written the below Power Shell and tested in our environment from local machine which is working fines as well.
Connect-MgGraph -Scopes 'Application.Read.All'
$listAppRegistrations = Get-MgApplication
$listEnterpriseApps = Get-MgServicePrincipal
$AppRegistrations = @()
$EnterpriseApps = @()
#To check the App registrations with notes as empty
foreach( $item in $listAppRegistrations){
if($item.Notes.Length -eq 0 ){
$AppRegistrations += $item.DisplayName
}
}
Write-output "Below are list of AppRegistration with Notes as Empty"
Write-Output $AppRegistrations
#To check the Enterprise registration with notes as empty
foreach($servicePrincipal in $listEnterpriseApps)
{
if($servicePrincipal.Notes.Length -eq 0 -and $servicePrincipal.AccountEnabled -eq $true -and $servicePrincipal.NotificationEmailAddresses.Length -eq 0){
$EnterpriseApps += $servicePrincipal.DisplayName
}
}
Write-Output "Below are list of EnterpriseApps which are enable but Notes and NotificationEmailAddress are Empty"
Write-Output $EnterpriseApps
Note : Please modify the output formats based on your requirements.
Please accept as "Yes" if the answer is helpful so that it can help others in the community.
Hope this helps, let me know if you have any further questions on this.