GitHub Icon Image

List all application customizers in a tenant

Summary

List all the application customizers in a tenant. Scope is default all. Here we are using the custom action list command to list out all the Application Customizers in all the sites in the tenant.

  • CLI for Microsoft 365 with PowerShell
  • Microsoft 365 CLI with Bash
$sites = m365 spo search --queryText "contentclass:STS_site -SPSiteURL:personal" --selectProperties "Path,Title" --allResults --output json | ConvertFrom-Json
foreach ($site in $sites) {                                                      
  write-host $site.Title                      
  write-host $site.Path                                             
  m365 spo customaction list --url $site.Path   
} 

Check out the CLI for Microsoft 365 to learn more at: https://aka.ms/cli-m365

#!/bin/bash

# requires jq: https://stedolan.github.io/jq/

defaultIFS=$IFS
IFS=$'\n'

sites=$(m365 spo search --queryText "contentclass:STS_site -SPSiteURL:personal" --selectProperties "Path,Title" --allResults --output json)

for site in $(echo $sites | jq -c '.[]'); do
  siteUrl=$(echo ${site} | jq -r '.Path')
  siteName=$(echo ${site} | jq -r '.Title')
  echo $siteUrl
  echo $siteName
  m365 spo customaction list --url $siteUrl
done

Check out the CLI for Microsoft 365 to learn more at: https://aka.ms/cli-m365

Source Credit

Sample first appeared on List all application customizers in a tenant | CLI for Microsoft 365

Contributors

Author(s)
Rabia Williams

Disclaimer

THESE SAMPLES ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.

Back to top Script Samples
Generated by DocFX with Material UI