@Alex D Thanks for posting in our Q&A.
Based on my research, I find that this error message is recorded in the official article. Please refer to the following article:
It is suggested to update Microsoft Defender for Endpoint on macOS to the lastest version. Then try to Follow the MicrosoftDefenderATPOnboardingMacOs.py instructions.
Hope it will help.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.