Subscribers of Apple Music can allow third-party apps to access the app and their music collection. Here's how to grant that access to other apps in macOS.
Apple Music app icon for macOS
Apple Music on the Mac has a little-known feature that allows third-party apps to access your music collection.
For example, you could use it to connect smart speakers like Amazon's Echo so you can play songs and playlists from your Apple Music account. Apps may also offer other features, such as a music game allowing players to add their favorite tracks to an Apple Music playlist.
These are handy things to do, but not every app needs full-time access to Apple Music data. In some cases, you may want to remove that access completely.
But in order to use the feature you have to first subscribe to Apple Music.
To do so, make sure you're logged in to your Apple account in the Apple Music app, then choose Account->Join Apple Music from the menu bar in the macOS Apple Music app.
When you join Apple Music, you get one month free, then it costs $10.99 per month every month after that.
Once you join Apple Music, choose Account->Apps With Access also from the menu bar in the Music app. This brings up a pane listing which third-party apps are available to use that support Apple Music.
Choose which apps to grant Music access to.
Select the apps you want to grant access to, and click Done. This gives those third-party apps access to your music library stored in Apple Music.
Now you can use those third-party apps to play your music collection.
The same menu option is also used to remove access for apps. Click Remove next to each app you want to disconnect from Apple Music, then Done
Apple has a little note about how to use the feature in the Apple Music User Guide.
To cancel your subscription to Apple Music, Apple has a page on that too.
On a different but related note, Apple also has an online Apple Music web browser which many people are unaware of.