List all Apps for SharePoint Site Collections (Office 365)

As part of a recent tenant-to-tenant migration, we have been needing to check where (and WHICH) apps were added.

This is mainly for NINTEX – but this script lists other 3rd party and developer apps also.

This includes GROUP sites – as part of an Office365 site, and/or Microsoft Team – as well as the GROUPLESS sites (classic).

$cred = Get-Credential

$orgName = "TENANT" 
$adminUrl = "https://$" 
Connect-PnPOnline $adminUrl -Credentials $cred

function ListApps ($url)
   Connect-PnPOnline -Url $url -Credentials $cred    
   $apps = Get-PnPAppInstance
   foreach ($app in $apps)    
      $logLine = $url + " - " + $app.Title        

#get a list of group sites
$groupSiteCollections = Get-PnPTenantSite -Template GROUP#0
foreach ($sc in $groupSiteCollections) { ListApps $sc.Url }

#get a list of classic sites
$classicSiteCollections = Get-PnPTenantSite 
foreach ($sc in $classicSiteCollections) { ListApps $sc.Url }

This then displays a long list of all site collections – and – APPS ;

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s