How to print all installed configuration profiles on MacOS.

In <https://support.apple.com/guide/mac-help/configuration-profiles-standardize-settings-mh35561/mac>, Apple says

View an installed configuration profile:

On your Mac, choose Apple menu → System Settings, click Privacy and Security in the sidebar, then click Profiles on the right. (You may need to scroll down.) Select a profile in the Profiles list to view information about it.

Is there a way to get this information on the command line or via an API? I would like to include a dump of all of this info in my debug logs of my application, so that I know when it misbehaves whether or not the system permissions were set correctly.

Replies

sudo profiles show -o stdout Seems to work, but why does this command requires root privileges? The System Settings app doesn't seem to need it!