Find all pages utilizing the Microsoft 365 Learning Pathways web part

An interesting thread was initiated by Loryan Strant on Twitter.

The solution

That sparked an idea, and finally, a potentially very easy solution! I Think the main issue is to find where a web part is being used to be able to contact site owners to manage change management (when a new version of a web part is available), allow a better understand of the utilized web parts, etc.

Mikael Svenson already wrote a great article on how to Locate a Locate pages where a particular web part is being using on modern SharePoint sites. I used a similar approach with the component id of the Microsoft 365 Learning Pathways.

The script

And the result!

Hope it's useful!