Last active
February 9, 2023 16:12
-
-
Save TiloGit/33e95c5afe3acfc959e953db532abc72 to your computer and use it in GitHub Desktop.
Check Azure AD enterprise apps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-AzureADServicePrincipal -All:$true | ? {$_.Tags -eq "WindowsAzureActiveDirectoryIntegratedApp"} | Foreach-Object{ | |
$AppObjectId = $_ | |
$AppUser = Get-AzureADServiceAppRoleAssignment -ObjectId $AppObjectId.ObjectId #-All $true | |
New-Object -TypeName PSObject -Property @{ | |
AppDisplayName = $AppObjectId.DisplayName | |
AppDisplayName2 = $AppObjectId.AppDisplayName | |
AppPublisherName = $AppObjectId.PublisherName | |
AppObjectId = $AppObjectId.ObjectId | |
AppAppId = $AppObjectId.AppId | |
AppReplyUrls = $AppObjectId.ReplyUrls | |
UserUPN = $AppUser.PrincipalDisplayName | |
UserCreation = $AppUser.CreationTimestamp | |
#UserAndDate= "$($AppUser.PrincipalDisplayName) at $($AppUser.CreationTimestamp)" | |
} | |
} | select AppDisplayName,AppDisplayName2,AppPublisherName,AppObjectId,AppAppId,@{ n='AppReplyUrls'; e={ $_.AppReplyUrls -join ' ' } },@{ n='User'; e={ $_.UserUPN -join ' ' } },@{ n='UserCreated'; e={ $_.UserCreation -join ' ' } } | Export-Csv -Path .\AppsO365.csv -NoTypeInformation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment