In SPO, how to get the App Display Name and App Identifier details which are displayed in _layouts/15/appprincipals.aspx?Scope=Web page using PowerShell?

Get-PnPApp command displays the app details installed from app store but doesn't display the app details from _layouts/15/appprincipals.aspx?Scope=Web page

I am not able to find any PowerShell command to get the ClientID/App Identifier details from _layouts/15/appprincipals.aspx?Scope=Web page.

Update 26-Jun-2023:

Based on Vlaad Karassev recommendation, tried using Get-PnpAzureACSPrincipal command but getting the below error:

What am i doing wrong?

Connect-PnPOnline -Url "SiteURL" -TenantAdminUrl "TenantAdminSiteURL" -UseWebLogin
Get-PnPAzureACSPrincipal -scope Site -IncludeSubsites

enter image description here


1 Answer 1


Get-PnPAzureACSPrincipal Returns the list of Azure ACS Principals

Here is my research on the subject.

  • Yes, but there are no ways to associate the Azure ACS principals to the site where they are used . We have more than 30,000 Azure ACS principals and more than 100K sites and we find it difficult to manage the principal's information
    – George
    Commented Jun 11, 2023 at 16:57
  • I iterate through sites, connect to each site and run Get-PnPAzureACSPrincipal in the site context. Also - that's what I actually do - I pull from audit logs monthly all visiting appregnew.aspx and appinv.aspx events - so I know who at least tried to use ACS principals at which site - and I know whom to contact - app owner and site owner. It takes up to one year to know all ACS apps owners - as secret expires after 1 year so they have to return to appinv.aspx. Commented Jun 13, 2023 at 1:57
  • @Vlaad Karassev any problem with the script i ran ?(Script updated in question) For some reason, i am getting the error for any site i use in the script:
    – George
    Commented Jun 26, 2023 at 13:28
  • 1
    @VlaadKarassev. Issue resolved once i used -Interactive instead of -UseWeblogin. Many thanks for your response
    – George
    Commented Jun 27, 2023 at 4:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.